In todays video I show you how to make a Tool do damage to other players, this type of system is great if your trying to make a simple and basic sword inside your very own Roblox Game, this system can also be used in a variety of different ways. I really enjoy making these videos for you all so I hope you enjoy them just as much as I do!
Have a lovely rest of your day!
Script (Inside part which is doing damage):
local debounce = false
local WaitTime = 0.5 -- Change to how often you want the player to be able to cause damage to other players.
local Damage = 10 -- You are able to change this to how much damage you want the tool to do each time it hits the player.
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid and not debounce then
debounce = true
humanoid:TakeDamage(Damage)
wait(WaitTime)
debounce = false
end
end)
------------
If you are a bit confused what to do, Feel free to create a ticket in my discord server and we can help you out!
NEW! Floppys Obby Game : www.roblox.com/games/14917960...
Floppys Simulator Game: www.roblox.com/games/13963457...
FloppyFish Merch Store: itz-floppyfish.creator-spring...
If you would like to support me even more, Super Thanks and becoming a Member is also another way to show your appreciation!
🌟 Floppys Discord Server: / discord
🌟 Floppys Roblox Game : www.roblox.com/games/11301003...
Roblox Studio Tutorial
Roblox Studio
Studio Tutorials
Негізгі бет Ойындар How to make a Tool do DAMAGE | Roblox Studio Tutorial
Пікірлер: 36