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

How do I get this to work so that a team of green players are inserted to 1 slot??

Asked by 10 years ago

I have all players on a team of bright green inserted to 1 random slot of a string value? I have a script and 3 string values in the script named King. How can I make the script below work so that it will insert all the players on green in 1 random slot once??

print("Starting for random slots on green")
        local labels={}
        local count=1
        for _,v in pairs(game.Players:GetPlayers())do
      if v.TeamColor==BrickColor.new("Bright green")and labels[count]then
    labels[count]=v
    table.insert(labels,count,v.Name)
 count=count+1
print("Ended random slots on green")

end end

1 answer

Log in to vote
0
Answered by 10 years ago

??????

Ad

Answer this question