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

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

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

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