Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to change surface GUI text but not changing?

Asked by 5 years ago

So I'm trying to make a surface guy change to the time a player has been in my game. I got a script for the free model's tab which shows how long a player has been in my game for which works fine but my scripts just not displaying it on a surface GUI.

Here is my script:

while true do
    wait(1)
    script.Parent.Text = game.Players.LocalPlayer.leaderstats["Time Played"].Value
end

Any help would be really appreciated.

0
the issue is that you're either using a local script in workspace (which doesnt work) or you're using LocalPlayer in a server script (which also doesnt work) Gey4Jesus69 2705 — 5y
0
Thanks I moved the script to StarterPlayer and now it's working. SpacePuppyMan 31 — 5y

Answer this question