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

Make A Player Join A Team When They Join? [closed]

Asked by 4 years ago

Hello there! How can I make a script where if the player joins the game it auto team him to a specific team.

Colour of the team: fossile team name: Outsiders

0
im pretty sure you just have to do player.Team = TeamObject questionthonk 36 — 4y
0
so in your case it would be player.Team = game:GetService("Teams"):WaitForChild("Outsiders") questionthonk 36 — 4y
0
what about the team colour and the name how the script would know which team GGredfox_GG -8 — 4y
0
nvm shoukd that be in serverscriptservices GGredfox_GG -8 — 4y
View all comments (3 more)
0
oh, you could also just set both of the teams autoassignable to true and then itd be handled automatically questionthonk 36 — 4y
0
oh GGredfox_GG -8 — 4y
0
thans it works GGredfox_GG -8 — 4y

Closed as Not Constructive by User#29913 and youtubemasterWOW

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 4 years ago

Your code would be


game.Players.PlayerAdded:Connect(function(plr) plr.Team = game.Teams.Outsiders plr:LoadCharacter() end)

But also this isn’t a request site

Ad
Log in to vote
0
Answered by 4 years ago

You can use this code:

game.Players.PlayerAdded:Connect(function(p)
    p.Team = game.Teams:WaitForChild("Outsiders")
end

For the future, this is to help people fix their code, not make the code.