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

Can anyone tell me a script about team selection please?

Asked by 7 years ago

Hello I hope you have a Good day....So I am making a game on roblox that contain four team one player for each team like one player in red team and one player in blue team,,,etc....I don't want the players to choose their team i want them to be in a random team selection.....if anyone can help me i would appreciate that I've been looking everywhere for help....I hope you guys would help me....Thank you

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
7 years ago
game.Players.PlayerAdded:Connect(function(plr)
    local teams = game:GetService("Teams"):GetChildren()
    plr.Team = teams[math.random(1,#teams)]
end)
0
Thank you mattscy for replying to me question :D .......im still a newbie in game creations.....how do i make four teams red,blue,Green and yellow...if you have more information that would be great Romy_99 6 — 7y
0
Thank you so much for your help I made four teams with ur help.....i hope you have an amazing day....thank you again Romy_99 6 — 7y
Ad

Answer this question