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

Why doesn't the text change?

Asked by
tber8 37
7 years ago
Edited 7 years ago

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
1
Not working because output is not a number value so you can't subtract from text. FiredDusk 1466 — 7y
0
An addition to FiredDusk's comment, use tonumber(), it converts any numbers, integers in a string format to a number format. rexbit 707 — 7y

1 answer

Log in to vote
1
Answered by
FiredDusk 1466 Moderation Voter
7 years ago
Edited 7 years ago
--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!

0
On the line 12 u put 20 insrtead of 30 dovydas12345 15 — 7y
0
this is very helpful, but the text still doesnt chande tber8 37 — 7y
0
Got any errors? FiredDusk 1466 — 7y
Ad

Answer this question