I made a brick that when touched it makes you faster and gives you a sword which i called stick, it worked fine but it gave you too many swords so i added the debounce but it didn't do anything when i added it. How can i fix this?
local Canpress = true script.Parent.Touched:connect(function(hit) if Canpress == true then Canpress = false hit = hit.Parent:FindFirstChild("Humanoid") hit.WalkSpeed = hit.WalkSpeed*1.25 local player = game.Players:GetPlayerFromCharacter(hit.Parent) local ClonedSword = game.ServerStorage.Stick:Clone() ClonedSword.Parent = player.Backpack Canpress = true end end)