I would like to know how to tweak this script so it deducts 25 health instead of deducting 100 health each time some one touches it?
function onTouch(part) local human = part.Parent:findFirstChild("Humanoid") if (human == nil) then return end human.Health = 0 end script.Parent.Touched:connect(onTouch)
debounce = false function onTouch(part) local human = part.Parent:FindFirstChild("Humanoid") if not human then human = part.Parent.Parent:FindFirstChild("Humanoid") end if debounce == false and human then debounce = true human:TakeDamage(25) wait(1) debounce = false end end script.Parent.Touched:connect(onTouch)