for _,v in pairs(game.Workspace.Part:GetChildren()) do
local debounce = false
local cd = 2
debounce = true
if hit.Parent:FindFirstChild("Humanoid") then
debounce = false
Whats the problem though…? Pretty hard to check what the error is without knowing the problem.
You aren’t using the debounce anywhere. You’re setting it to true and false, but doing nothing with it. You need to actually check the debounce in the if statement for it to actually work.
if debounce == false then
Yeah. This would also work in OP’s case:
if hit.Parent:FindFirstChild("Humanoid") and not debounce then