I put a script in server script service and put this following:
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(c) c:WaitForChild("Humanoid").Running:connect(function(speed) if speed >= 10 then repeat print("Working?") plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value -1 until if speed < 10 then plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value +1 end end end end)
Your problem is on line 2 where you said that the humanoid would be inside of Server Script service.