how to you make a damage part
3 months ago
• By Index
local Damage = 15
local DelayBetweenDamage = 0.5
local Debounce = true
script.Parent.Touched:Connect(function (collision)
if collision:IsA('Player') and Debounce == false then
Debounce = true
collision.Health = collision.Health - Damage
wait(DelayBetweenDamage)
Debounce = false
end
end)
Code was taken from PolyCode (collection of pre-made scripts, tutorials, and resources - made by me!)
hey, i'm Index! :)
2 months ago
• By Maxdj8000
Index 3 months ago
``` local Damage = 15 local DelayBetweenDamage = 0.5 local Debounce = true script.Parent.Touched:Connect(function (collision) if collision:IsA('Player') and Debounce == false then Debounce = true collision.Health = collision.Health - Damage wait(DelayBetweenDamage) Debounce = false end end) ``` Code was taken from PolyCode (collection of pre-made scripts, tutorials, and resources - made by me!)
thx! ima use this in an up coming obby im making!
ho ho homies get in focus then take notice