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

code wont run if statements at all?

code:

wait(1)
local teams = game:GetService("Teams"):GetTeams()
local text = script.intermission.SurfaceGui.Frame.TextLabel
local players = game.Teams
print(#players)
if #players.Playing:GetPlayers() == 0 then
		text.Text = 'intermission'
		print('round in progress')
	else
		text.Text = 'round in progress'
		print('round in progress')
end

I test the game and it won't print anything, nor will it change the text.

3 comments

0

You're checking under the player variable for Teams not players. So you will only get a list of teams. And you should aso try using "For i,v in pairs([teams variable])"

0

Where abouts is your script located? I know that if a script is put in some places it won't run. I can't remember exactly where these places are, but try moving your script around to see if that fixes the issue.

0

its in workspace

1 answer

To be honest your code is all wrong lol

tell me what you're trying to do and I'll have it fixed asap

Also don't down vote this I will give him serious help

1 comment

0

when theres 0 players on the playing team it will change the text on the sign. when theres more than 0 players on the playing team then it will change the text on the sign to something different

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