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

How do I make a one person team?

Asked by 10 years ago

Hello, I've come here to ask about how do I make a one team person like in the Stalker and many more. I've once ask this in Roblox Forum but without much help so I'm here ask you. I have only one clue here.

player = game.Players:GetPlayers()

chosen = math.random(#player)

game.Players[chosen].TeamColor = BrickColor.new("Bright green")

1 answer

Log in to vote
3
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
local players = game.Players:GetPlayers()
local stalker = players[math.random(#players)]

for i,v in pairs(players) do 
    if v.Name ~= stalker.Name then 
        v.TeamColor = BrickColor.new("Bright red")
    else
        v.TeamColor = BrickColor.new("Bright green")
    end
    v:LoadCharacter()
end

0
Thanks! :D knight69 0 — 10y
Ad

Answer this question