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

How do I make a group only spawn?

Asked by 11 years ago

Whenever I attempt to make one it forces every player to join the team (even if they're not in the group)

0
Did you change the teams AutoAssignable to false and can we see the code you are using? Sublimus 992 — 11y

3 answers

Log in to vote
1
Answered by 11 years ago

Try this.

01local groupId = 0; --change this to the id of your group
02local team = game.Teams['TeamName']; --change "TeamName" to the name of your group team
03 
04Game.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
11end)

EDIT: Make sure the team's AutoAssignable property is set to false

Ad
Log in to vote
0
Answered by 11 years ago

Have the team first not auto-assignable from the team itself, then use a group only team such as

SCRIPT BELOW

01local groupId = 123456-- Enter your group number here!
02local groupId = 123456
03function RegisterPlayer( player )
04if CheckInGroup(player, groupId) then
05HoldThreadForCharacter(player)
06player.Character:MoveTo(script.Parent.Position + Vector3.new(0,3,0))
07end
08end
09 
10function CheckInGroup( player, id )
11if player:IsInGroup(id) then
12return true
13end
14return false
15end
View all 23 lines...
Log in to vote
-1
Answered by 11 years ago

I learned that from this guy http://youtu.be/PiLqpas-guY

Answer this question