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
table(blue[1]) just needs to be blue[1], and same with all the others. table() isn't a function.