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

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

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

print "Screen Changer Loaded!"

Screen = Workspace.TheScreen.SurfaceGui.TextLabel.Text

while true do
	Screen = "Donuts and coffee, at their best."
	Wait(7)
	Screen = "Scrumptious, Delectable donuts!"
	Wait(7)
	Screen = "Welcome to the interview office!"
	Wait(7)
	Screen = "We wish you good luck at your interview!"
	Wait(7)
	
end

It does not work and I need help.

4 answers

✓ Accepted answer
print "Screen Changer Loaded!"

local screen = game.Workspace.TheScreen.SurfaceGui.TextLabel

while true do
    screen.Text = "Donuts and coffee, at their best."
    wait(7)
    screen.Text = "Scrumptious, Delectable donuts!"
    wait(7)
    screen.Text = "Welcome to the interview office!"
    wait(7)
    screen.Text = "We wish you good luck at your interview!"
    wait(7)
end

7 comments

1

If that doesn't work, then change "Screen" at the beginning to "local Screen"

1

Thumbs up and accept the answer, please! :)

0

Still testing

0

I would have liked it if I had enough reputation... Could you like this question?

1

Sure thing.

0

Thanks

1

Thank you.

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

print "Screen Changer Loaded!"

local scr = game.Workspace.TheScreen.SurfaceGui.TextLabel
wordsToSay = {"Donuts and coffee, at their best.", "Scrumptious, Delectable donuts!", "Welcome to the interview office!", "We wish you good luck at your interview!"}

while true do
	for i = 1, #wordsToSay do
	scr.Text = wordsToSay[i]
	wait(7)
	end
end

you to set it as:

print "Screen Changer Loaded!"
Screen.text = Workspace.TheScreen.SurfaceGui.TextLabel.Text
while true do
    Screen.text = "Donuts and coffee, at their best."
    Wait(7)
    Screen.text = "Scrumptious, Delectable donuts!"
    Wait(7)
    Screen.text = "Welcome to the interview office!"
    Wait(7)
    Screen.text = "We wish you good luck at your interview!"
    Wait(7)

if this doesnt work change .text to .Text

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