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

Adding Team Players to list for Gui?

Asked by 9 years ago

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

1
So what is your issue? Is there anything in the Output? minikitkat 687 — 9y
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 fishing10 0 — 9y

1 answer

Log in to vote
1
Answered by 8 years ago

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

Ad

Answer this question