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

how would i create a team where i can assign who is on what team?

Asked by 9 years ago

i want to have like only certain people on certain teams then one team that any one can be one

1 answer

Log in to vote
0
Answered by
Kurieita 125
9 years ago

The team doesn't matter, the script does.

Each player has a property called 'TeamColor'

So to assign a player to a certain team, you can do

PlayerName.TeamColor = BrickColor.new("Bright red") 

Or

PlayerName.TeamColor = Game.Teams['Red team'].Color

Thumb up and accept please :)

--[[ Updated]]--

local Players = { --List of players who get the sword
['Player1'] = true,
['Player2' = true, 
['Player3'] = true
}

Game.Players.PlayerAdded:connect(function(Player)
if Players[Player.Name] then
Game.ReplicatedStorage.Sword:Clone().Parent = Player:WaitForChild('Backpack')
--Make sure the sword name is "Sword" inside of ReplicatedStorage
end
end)

0
okay how will i put the other people in like one team so they dont just magicly apear on my team ags5321 0 — 9y
0
Well, there a property in a 'Team' object. Inside Game.Teams, there should be for say 'Red team' and use the properties viewer and set AutoAssignable to false Kurieita 125 — 9y
0
im super confused all i really need to do is assign a sword to certain ppl ags5321 0 — 9y
0
Well, give me a minte and I will update my answer to show you how that would be done. Kurieita 125 — 9y
View all comments (2 more)
0
alright ags5321 0 — 9y
0
still doesnt work ags5321 0 — 9y
Ad

Answer this question