|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
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 |
|
|
|
| 31 Mar 2015 09:00 PM |
| Didn't know this was that complicated. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 31 Mar 2015 09:10 PM |
| How could we use this using tables? |
|
|
| Report Abuse |
|
|