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

Could you help me with this script that won't work?

Asked by 11 years ago

I made a script to change the text of a Textbox on a SurfaceGui.

01print "Screen Changer Loaded!"
02 
03Screen = Workspace.TheScreen.SurfaceGui.TextLabel.Text
04 
05while true do
06    Screen = "Donuts and coffee, at their best."
07    Wait(7)
08    Screen = "Scrumptious, Delectable donuts!"
09    Wait(7)
10    Screen = "Welcome to the interview office!"
11    Wait(7)
12    Screen = "We wish you good luck at your interview!"
13    Wait(7)
14 
15end

It does not work and I need help.

4 answers

Log in to vote
3
Answered by
c0des 207 Moderation Voter
11 years ago
01print "Screen Changer Loaded!"
02 
03local screen = game.Workspace.TheScreen.SurfaceGui.TextLabel
04 
05while true do
06    screen.Text = "Donuts and coffee, at their best."
07    wait(7)
08    screen.Text = "Scrumptious, Delectable donuts!"
09    wait(7)
10    screen.Text = "Welcome to the interview office!"
11    wait(7)
12    screen.Text = "We wish you good luck at your interview!"
13    wait(7)
14end
1
If that doesn't work, then change "Screen" at the beginning to "local Screen" c0des 207 — 11y
1
Thumbs up and accept the answer, please! :) c0des 207 — 11y
0
Still testing My_Comment 95 — 11y
0
I would have liked it if I had enough reputation... Could you like this question? My_Comment 95 — 11y
View all comments (3 more)
1
Sure thing. c0des 207 — 11y
0
Thanks My_Comment 95 — 11y
1
Thank you. c0des 207 — 11y
Ad
Log in to vote
2
Answered by
Dummiez 360 Moderation Voter
11 years ago

If you want it in a table, so you can easily edit/add in extra phrases; similar to an admin list!

01print "Screen Changer Loaded!"
02 
03local scr = game.Workspace.TheScreen.SurfaceGui.TextLabel
04wordsToSay = {"Donuts and coffee, at their best.", "Scrumptious, Delectable donuts!", "Welcome to the interview office!", "We wish you good luck at your interview!"}
05 
06while true do
07    for i = 1, #wordsToSay do
08    scr.Text = wordsToSay[i]
09    wait(7)
10    end
11end
Log in to vote
-1
Answered by 11 years ago

you to set it as:

01print "Screen Changer Loaded!"
02Screen.text = Workspace.TheScreen.SurfaceGui.TextLabel.Text
03while true do
04    Screen.text = "Donuts and coffee, at their best."
05    Wait(7)
06    Screen.text = "Scrumptious, Delectable donuts!"
07    Wait(7)
08    Screen.text = "Welcome to the interview office!"
09    Wait(7)
10    Screen.text = "We wish you good luck at your interview!"
11    Wait(7)

if this doesnt work change .text to .Text

Log in to vote
-3
Answered by 11 years ago

Find one helpful:

http://wiki.roblox.com/index.php?title=Special%3ASearch&profile=default&search=Textbox+&fulltext=Search

Answer this question