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 » Scripters
Home Search
 

Re: Different Spawns

Previous Thread :: Next Thread 
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 06:36 PM
I'm trying to make it so that people don't spawn on the same spawn. I though the 'table.remove(Spawns, SpawnIndex)' should work?

local SpawnsModel = MapHolder[NewMap.Name]:WaitForChild("Spawns")
local Spawns = SpawnsModel:GetChildren()
local SpawnIndex = math.random(1, #Spawns)
local Spawn = Spawns[SpawnIndex]
table.remove(Spawns, SpawnIndex)
Torso.CFrame = CFrame.new(Spawn.Position + Vector3.new(0, 3, 0))
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 06:44 PM
b1
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 06:51 PM
b2
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 07:13 PM
b3
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 07:19 PM
b4
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
31 Mar 2015 07:21 PM
Maybe use some temp variable and check if the last spawn they spawned in, is different using 'if' statement?
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 09:00 PM
Didn't know this was that complicated.
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
31 Mar 2015 09:04 PM
Or have a bool value inside of the 'spawn' as when it is used check it off?
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
31 Mar 2015 09:10 PM
How could we use this using tables?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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