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

script wont change TextLabel's text?

Asked by 6 years ago

When I play the game the text doesn't change. Why?

playerCount = 2 -- how many players needed to start the game
menuText = script.Parent.Text
gameName = "yolopp" --the name of the game


while true do
    if game.Players.NumPlayers <= playerCount then
        menuText = "Waiting for players..."
        wait(.8)
        menuText = "Waiting for players.."
        wait(.8)
        menuText = "Waiting for players..."

    elseif game.Players.NumPlayers >= playerCount then
        menuText = "There are enough players to begin the game!"
        wait(2)
        menuText = "Welcome to "gameName"."
        wait(2)
        menuText = "The theme for this round will be freestyle!"
        wait(2)
        menuText = "Teleporting players.."
        wait(.8)
        menuText = "Teleporting players..."
        wait(.8)
        menuText = "Teleporting players.."
        wait(.8)
    end
end
0
menuText.Text XeonNetwork -5 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

First You Need To Do Something Like This Before The Script:

local menuText = game.StarterGui.Frame.TextLabel 

Do This On The First Line Of Code!

0
Put This On The First Line After While True Do JamiethegreatQ777 16 — 6y
0
OML A PLAYERS GUIS ARE STORED IN THEIR `PLAYERGUI`, NOT IN STARTERGUI iddash 45 — 6y
Ad

Answer this question