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

Why won't this script work?

Asked by 9 years ago

Here is the script:

gui = game.StarterGui.ScreenGui.TextLabel

while true do
gui.Text = "Welcome to Brick Builders!"
wait(3)
gui.Text = "To get your building tools, go to the office."
wait(3)

Can you help?

0
1, did you end it? 2, and it might not be this but, i tried something similiar and it was because StarterGui only updates when your character spawns, so if you run this script then reset it will change the text, but not automatically nicros 165 — 9y
0
Oh! Now I get it. I need to use PlayerGui, not StarterGui! NeonicPlasma 181 — 9y

1 answer

Log in to vote
0
Answered by
JJ_B 250 Moderation Voter
9 years ago

Firstly, you need to end the while loop.

while true do
gui.Text = "Welcome to Brick Builders!"
wait(3)
gui.Text = "To get your building tools, go to the office."
wait(3)
end

Also, the GUI won't be in StarterGui, it will be in the player's PlayerGui. In order to locate this, you need to make sure this is a local script, and use gui = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel

Hope I helped.

0
Thanks. NeonicPlasma 181 — 9y
Ad

Answer this question