Whenever I attempt to make one it forces every player to join the team (even if they're not in the group)
Try this.
01 | local groupId = 0 ; --change this to the id of your group |
02 | local team = game.Teams [ 'TeamName' ] ; --change "TeamName" to the name of your group team |
03 |
04 | Game.Players.PlayerAdded:connect( function (p) |
05 | if p:IsInGroup(groupId) then -- check if they're in the group |
06 | p.TeamColor = team.TeamColor -- Set their team to the group team |
07 |
08 | repeat wait() until p.Character |
09 | p:LoadCharacter() |
10 | end |
11 | end ) |
EDIT: Make sure the team's AutoAssignable
property is set to false
Have the team first not auto-assignable from the team itself, then use a group only team such as
SCRIPT BELOW
01 | local groupId = 123456 -- Enter your group number here! |
02 | local groupId = 123456 |
03 | function RegisterPlayer( player ) |
04 | if CheckInGroup(player, groupId) then |
05 | HoldThreadForCharacter(player) |
06 | player.Character:MoveTo(script.Parent.Position + Vector 3. new( 0 , 3 , 0 )) |
07 | end |
08 | end |
09 |
10 | function CheckInGroup( player, id ) |
11 | if player:IsInGroup(id) then |
12 | return true |
13 | end |
14 | return false |
15 | end |
I learned that from this guy http://youtu.be/PiLqpas-guY