if script.Parent.CanDamage.Value == true then
if not touch.Parent:FindFirstChild("Humanoid") then return end
script.Parent.CanDamage.Value = false
touch.Parent.Humanoid:TakeDamage(plr.leaderstats.Power.Value)
if touch.Parent.Humanoid.Health < 1 then
local plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
plr.leaderstats.Kills.Value = plr.leaderstats.Kills.Value + 1
end
wait(1)
script.Parent.CanDamage.Value = true
end
Then why did you suggested to change between client to server?
Anyway, are you sure that the CanDamage value is actually true@Fallguysgod1234567? Also a debouncer can be done with a single variable as the control variable.
local debouncer = false
local function onHit()
if debouncer then return end
debouncer = true
task.wait(1)
debouncer = false
end
If he was already using this method, why did you answer with the same problematic? This doesn’t make any sense, refrain from answering with the same code that is being used.