game.Players.PlayerAdded:connect(function(plr)
if plr then
plr.PlayerGui.Cash.TextLabel.Text = "100$"
end
end)
✓ ANSWER ACCEPTED
This script wont work?
1 answer
✓ Accepted answer
The problem here is that the items inside of plr have not loaded yet because the player was just created. Use WaitForChild to wait for them to load:
game.Players.PlayerAdded:connect(function(plr)
plr:WaitForChild("PlayerGui"):WaitForChild("Cash"):WaitForChild("TextLabel").Text="$100"
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Does not work
It won't work offline because players are created before scripts run. It does work online.
There should really be an entire article devoted to why people should be using client and server tests over the Play Solo feature. I've seen so many issues arise from people giving Play Solo merit. It's about as powerful as the command bar, except with a termination option.