I just want to players see this in there cash Gui (EXEMPLE : 1,253,453)
so when they play they will not see as 1253453
the script that i made d'ont wanna execute it just not showing me comma when i add 1000 in the number value
game.Players.PlayerAdded:Connect(function(plr)
local stats = Instance.new("Model", plr)
stats.Name = "Leaderstats"
local cash = Instance.new("NumberValue", stats)
cash.Value = 0
cash.Name = "Cash"
return #cash % 3 == 0 and cash:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or cash:reverse():gsub("(%d%d%d)", "%1,"):reverse()
end)

3 comments
http://lua-users.org/wiki/FormattingNumbers
I d'ont understand this , you know i am not a programmer student
you could use string.len() (gets length) and just check every time the cash length increase(1000 to 10000) then just add in the comma's where you know they'll be. Not the best way but is the simplest.