|
| 25 Feb 2012 09:34 PM |
| How do you make a spawn that will make it so a group will spawn at one and anyone else will spawn at another? Every time i do it, my guys spawn at the other spawn. Please help. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Feb 2012 09:36 PM |
| Wasn't there a post about this earlier? |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 09:37 PM |
| Yeah, but every time i did what they said, it never worked |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 25 Feb 2012 09:38 PM |
| Have a position for the group spawn and other people spawn. Then, whenever someone joins, check if they're in the group (Using player:IsInGroup(groupId)). If they are, teleport to group spawn; otherwise, teleport them to the spawn for everyone else. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 09:39 PM |
local groupid = ???????
function onPlayerEntered(player) if player:IsInGroup(groupid) then player.CharacterAdded:connect(onCharacterAdded) end end
function onCharacterAdded(character) character:MoveTo(script.Parent.Position + Vector3.new(0,5,0)) end
game.Players.PlayerAdded:connect(onPlayerEntered)
--All you have to do was change the groupid? |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 09:41 PM |
You would also have to put that in the spawn you want your group to be in.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 09:43 PM |
| @jimmybolt77 So if someone whos not a part of my group joins, they go to the other spawn? Not the one i put the Script in? |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 09:45 PM |
If you make the spawn you put the script in inaccessible.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 10:43 PM |
I have a working group spawn script if you want it. PM me and I'll give it to you.
+-Fishy |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2012 10:47 PM |
Screw the PM. Here you go. Use one of these scripts ran in the Workspace per group. There is a way to list multiple spawns and make it random, but I don't know how to do that. Probably with an 'or' in line 9 or something. Anyway, this works for me.
function spawn(x,y,z, character) pcall(function() character.Torso.CFrame = CFrame.new(Vector3.new(x,y,z)) end) end game.Players.PlayerAdded:connect(function(new) new.CharacterAdded:connect(function(char) if new:IsInGroup() == true then --Goup ID number goes in the parenthesis spawn(-182 ,4 ,-180, char) --Coordinates where you want the character to spawn. end end) end)
+-Fishy |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Feb 2012 10:58 PM |
Did you put in your correct group ID? Also, this will only spawn you where you want when your in Play mode. It won't do it in build. Try that.
+-Fishy |
|
|
| Report Abuse |
|
|