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

Why doesn't the text change?

I am trying to make a round based game, but the intermission is a problem to make. I tried making the output print what I was putting on the sign, and it worked. I also double-checked the location of the text. Why won't the text change? It is just staying at the original "..." text.

Here is the entire script so far:

--tber8--

output = game.Workspace.Output.Screen.SurfaceGui.Frame.TextLabel.Text

--Configurations--
RoundLength = 120 --Round time in seconds.
IntermissionLength = 30 --Intermission time in seconds.

while true do
	output = IntermissionLength
	wait(1)
	repeat
		output = output - 1
	    wait(1)
	until output == 1
	output = "Game Beginning"
	wait(10)
end

2 comments

1

Not working because output is not a number value so you can't subtract from text.

0

An addition to FiredDusk's comment, use tonumber(), it converts any numbers, integers in a string format to a number format.

1 answer

--tber8--

local output = game.Workspace.Output.Screen.SurfaceGui.Frame.TextLabel.Text --Lets make this local

--Configurations--
local RoundLength = 120 --Round time in seconds.
local IntermissionLength = 30 --Intermission time in seconds.

while true do

	--//Intermission
	for i = 30,0,-1 do -- This says from 20 to 0 by going down1 every..
		wait(1) -- ...1 second
		output = 'Starting in ' ..i --Make the text stay the same but changes just the number.
	end

	wait(10)
end

Good luck with your game! Please accept and upvote if this helps!

3 comments

0

On the line 12 u put 20 insrtead of 30

0

this is very helpful, but the text still doesnt chande

0

Got any errors?

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