I want to change the GUI's text to cash, but it never changes and gives no errors. The leaderstats changes but the GUI does not. The script is located in starter character scripts.
wait(1)
local playerModel = script.Parent
local player = game.Players:GetPlayerFromCharacter(playerModel)
player:WaitForChild("leaderstats")
player.leaderstats:WaitForChild("Cash")
local cash = player.leaderstats.Cash
local moneyText = player.PlayerGui.ScreenGui.moneyLabel.Text
while true do
wait(5)
cash.Value = cash.Value + 100
moneyText = cash.Value
end
Does anyone know how to fix this? Thanks in advance!

1 comment
It works, thanks