I was using this code, and now it isn't working anymore. I don't get an error either. Help?
debounce = false script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) local leaderstats = player:WaitForChild("leaderstats") local cash = leaderstats:WaitForChild("Cash") local amount = 5 local weapon = game.ServerStorage:WaitForChild("LinkedSword") if not debounce then debounce = true if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid.Health > 0 then if leaderstats and cash and cash.Value >= amount then cash.Value = cash.Value - amount local weaponclone = weapon:Clone() weaponclone.Parent = player.Backpack local weaponclone = weapon:Clone() weaponclone.Parent = player.StarterGear wait(2) debounce = false end end end end)