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

script wont change TextLabel's text?

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

1 comment

0

menuText.Text

1 answer

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!

2 comments

0

Put This On The First Line After While True Do

0

OML A PLAYERS GUIS ARE STORED IN THEIR PLAYERGUI, NOT IN STARTERGUI

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