while wait(0.1) do
script.Parent.Text = tostring(“$”…player:WaitForChild(“leaderstats”).Cash.Value)
end)
I do Wait For Child so it waits until the player is actually in the game. It will update the value every second. Also you are just indexing a number, with a string. You should be converting the number into a string using the tostring() function within Roblox Studios.
Also the Wait For Child Function is because when the player is in the game. It does not necessarily mean leaderstats is already in the player yet. It takes a minute for the leaderstats to get in there.