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

Adding Team Players to list for Gui?

i am trying to make a script so that when my timer ends and splits the players(i have that) ,it will take each teams players and change the names of each part of my GUI.

script so far is as follows:

while script.Parent.BattleMenu.Value == true do -- when timer ends and splits teams
		local blue = {}
		local red = {}
		local locationB=script.Parent.Parent.Playerinfo
		local loactionR=script.Parent.Parent.Playerinfo
		local blues = game.Teams.Blue_Team:GetChildren()
--Find Blue team and place them in table		
		for i = 1, #blues do
    		print("printing "..blues[i].Name)
			table.insert(blue,blues[i].Name)
		end
			locationB.B1.Value=table(blue[1]) -- text i want to change to blue player 1
			locationB.B2.Value=table(blue[2]) -- text i want to change to blue player 2
			locationB.B3.Value=table(blue[3]) -- text i want to change to blue player 3
			locationB.B4.Value=table(blue[4]) -- text i want to change to blue player 4
--Find Red team and place them in table
	--not done yet
	
	
	break
end

2 comments

1

So what is your issue? Is there anything in the Output?

0

i cant get each individual text label in the gui to take the name of the player in each team. i could show you the gui i think, can i invite you to a roblox studio world

1 answer

table(blue[1]) just needs to be blue[1], and same with all the others. table() isn't a function.

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