So I am trying to change Speed value , Coin value and Character’s speed. But they don’t change. I guess mistake is where I put it. I put it in workspace
a = 0
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Wait()
local leaderstats = Instance.new("Folder",Player)
leaderstats.Name = "leaderstats"
local Speed = Instance.new("IntValue",leaderstats)
Speed.Name = "Speed"
Speed.Value = Player.Character:WaitForChild("Humanoid").WalkSpeed
local Coins = Instance.new("IntValue",leaderstats)
Coins.Value = 0
Coins.Name = "Coins"
Player.Character.Humanoid.Died:Connect(function()
Player.Character.Humanoid.WalkSpeed = a+16
Coins.Value = a
Speed.Value = a+16
workspace.Part.Touched:Connect(function()
a = a + 1
You can’t use a localscript to create a leaderboard or to change stats. If you change stats through a local script the server won’t be able to see the changes and it is easily hackable.