I am trying to make a button that you can buy something but only if you have a certain amount of "Deaths"
here's my script:
if game.leaderstats.Deaths.Value == 1 then
game.Workspace.Parent.StarterPlayer.CharacterWalkSpeed = 70
end
Can you help me?

4 comments
Could not find a specific YT vid lol
Well are you really sure the
leaderstatsare a child ofgame?No no entirely. The script for leaderstats was a model.
Here's what it says: Players.Username.PlayerGui.Shop.ShopFrame.LevelOne.LocalScript:1: attempt to index nil with 'leaderstats'