I want my leaderboard to show 1k instead of 1000 and also do that with higher numbers but it is not working correctly.
I am also getting an error saying: ServerScriptService.leaderboard:9: attempt to compare number with string 20:31:42.420 - Stack Begin
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local cash = Instance.new("StringValue",leaderstats)
cash.Name = "Cash"
cash.Value = 0
while wait() do
if cash.Value >= 1000 then
cash.Value = string.sub(tostring(cash.Value),1,1).."K"
end
end
end)

3 comments
Your comparing a string value when you did local cash = Instance.new() try turning the value of cash to a number
Why not use
IntValueinstead?He can't use letters with a value that expects an integer.