how to you make a damage part
9 months ago
| 28
• By Gamingtime1
how do i do it
9 months ago
• By Index
• 7d
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!
8 months ago
• By Maxdj8000
• 107d
Index 9 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! I'm what is oh yeah that show biz!