Hello there, I am trying to make a Cash for a different Rank in my game. This is my script in ServerScriptService:
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(plr)
local fol = Instance.new("Folder", plr)
fol.Name = "leaderstats"
local Cash = Instance.new("IntValue", fol)
Cash.Name = "Yuan"
Cash.Value = 5
local Rank = Instance.new("StringValue", fol)
Rank.Name = "Rank"
Rank.Value = "Frail"
while true do
wait(100)
Cash.Value = Cash.Value + 1
end
while true do
if Cash.Value == 500 then
Rank.Value = "Loark"
wait(1)
end
end
end)
Any suggestions are open. Thank you and stay safe.

4 comments
I don't understand what you want? Please be more descriptive in your questions so others and I can understand your problem
It's not that hard to figure out if you read the code:P
From my perspective I'm slightly confused on what this person wants to achieve
Well, when a player gets enough money, their rank changes in the game.