I am using a debounce for this, I don't want the part spam :TakeDamage(10) making it unfair, it is also unfair because a single unlucky person will get hit. I want to make the part damage several players without making the part spam alots of :TakeDamage() making the part overpowered. Here's an example:
local debounce = false script.Parent.Touched:Connect(function(hit) local human = hit.Parent:FindFirstChildOfClass("Humanoid") if hit.Parent.Name ~= "cherrythetree" then if human and debounce == false then debounce = true human:TakeDamage(10) wait(2) debounce = false end end end)
Anyone help???
You could make the debounce per-player instead of just having one variable.
local debounce_container = {} script.Parent.Touched:Connect(function(hit) local human = hit.Parent:FindFirstChildOfClass("Humanoid") local name = hit.Parent.Name if name ~= "cherrythetree" then if human and debounce_container[name] ~= true then debounce_container[name] = true human:TakeDamage(10) wait(2) debounce_container[name] = false end end end)