how to you make a damage part

Back
Gamingtime1
Join Date:
Posts:
Feb 2024
6
3 months ago | 28 • By Gamingtime1

how do i do it


Index Plus Deluxe
Join Date:
Posts:
Sep 2019
716
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! :)

Maxdj8000
Join Date:
Posts:
Apr 2023
144
2 months ago • By Maxdj8000
Index
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