Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED! =D] wait() not working? The wait(30) before the script makes it not run. What should I do?

Hello, I have a code that works fine until I put a wait(30) before it, when I put a wait(30) before it, the code does not run. (Even when I have waited more then 30 seconds it does not run.) This is very strange to me, may I have some help? P.S. The first part of the code makes the gui visible, and the second part makes the gui run something.

The Script;

wait(30)
game.StarterGui.stormgui.stormlabel.Visible = true 
wait(0.1)
game.StarterGui.stormgui.stormlabel.Value.Value = true
wait(0.1)

The image Link;

file:///C:/Users/rcutl/Downloads/need%20a%20little%20help...png

1 answer

✓ Accepted answer

StarterGui is just there to replicate its contents to the player. To change a player's Gui, you need to change it from the PlayerGui.

wait(30)
game.Players.LocalPlayer.PlayerGui.stormgui.stormlabel.Visible = true
wait(0.1)
game.Players.LocalPlayer.PlayerGui.stormgui.stormlabel.Value.Value = true
wait(0.1)

8 comments

0

Thankyou, I will try that and see if it solves the problem

0

No problem :)

0

Hello, unfortunately this did not work.

0

Is this on a serverscript, it only works on a local script

0

This is on a server script

0

It doesn't work on serverscripts. Put it inside a localscript and parent it to starterplayerscripts

0

Ok let me try that.

0

Thankyou!

This discussion is preserved as it was. New answers, comments, and votes are closed.