My script doesnt work! It says LocalPlayer is not valid member and wont add leaderstats Script:
local plr = game.Players.LocalPlayer game.Players.PlayerAdded:Connect(function() local folder = Instance.new("Folder") folder.Parent = plr folder.Name = "leaderstats" local money = Instance.new("IntValue") money.Parent = folder money.Name = "Money" end)
The client cant change anything on server. Use the script below and put it in a server script.
game.Players.PlayerAdded:Connect(function(plr) local folder = Instance.new("Folder") folder.Parent = plr folder.Name = "leaderstats" local money = Instance.new("IntValue") money.Parent = folder money.Name = "Money" end)
Just change the script to a LocalScript, should work fine then, if not then do what herrtt suggested.