So I made a script saying if you have one coin, walkspeed is = 21
local players = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function(Click)
if players.leaderstats.Coins.Value >= 1 then
players.leaderstats.Coins.Value = players.leaderstats.Coins.Value - 1
players.Character.Humanoid.WalkSpeed = 21
end
end)
But it came to my attention that when you die, your walkspeed get reset. can you help me? (Keep in mind that I have more than one of these scripts, and each one costs more and makes you faster.)

4 comments
Or, you could just disable the reset button
that's not what he wanted
Why are you changing the WalkSpeed on the client? Do it on the server.
So what are you saying? Sorry, I am sorta new to scripting.