generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Group Spawns

Previous Thread :: Next Thread 
glenman969 is not online. glenman969
Joined: 08 May 2010
Total Posts: 51
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Feb 2012 09:35 PM
Post the script.

† KMXD †
Report Abuse
jimmybolt77 is not online. jimmybolt77
Joined: 06 Jul 2008
Total Posts: 292
25 Feb 2012 09:36 PM
Wasn't there a post about this earlier?
Report Abuse
glenman969 is not online. glenman969
Joined: 08 May 2010
Total Posts: 51
25 Feb 2012 09:37 PM
Yeah, but every time i did what they said, it never worked
Report Abuse
L2000 is not online. 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
jimmybolt77 is not online. jimmybolt77
Joined: 06 Jul 2008
Total Posts: 292
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
glenman969 is not online. glenman969
Joined: 08 May 2010
Total Posts: 51
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Feb 2012 09:45 PM
If you make the spawn you put the script in inaccessible.

† KMXD †
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
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
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
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
glenman969 is not online. glenman969
Joined: 08 May 2010
Total Posts: 51
25 Feb 2012 10:56 PM
Didnt work
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image