I made this script and it dosent work help

game.Players.PlyerAdded:connect(function( PLAYER )
PLAYER:WaitForDataReady().
local stats = Instance.new("IntValue")
stats.Name = "leaderstats" 
local cash = Instance.new("IntValue") 
cash.Name = "Cash"
cash.Value = 0
cash.Parent =stats 
stats.Parent = PLAYER,
if PLAYER:LoadNumber("A") then
cash.Value = PLAYER:LoadNumber("A")
end
end)
game.Players.PlayerRemoving:connect(function( PLYR )
PLYR:SaveNumber("A", PLYR.leaderstats.Cash..Value),
end)

i fixed it the code now pls help

2 comments

1

You don't have to mark your titles as "Urgent". Someone is always able to help. Although you should actually provide us the convenience of properly formatting your code inside of a code block.

1

You're also using a deprecated method of data saving. See DataStoreService as it is a much better way to save player data. You should also look over your code as you have syntax spelling mistakes and random periods/commas.