RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 01:45 PM |
Let's say we have SpawnLocations A, B, C, all of same Team color.
When Player dies, I want him to go to Spawn A. When needed, I want to change and make it C. How? |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 22 Jul 2011 01:46 PM |
| Make a sript that moves him to the proper spawn when he respawns? |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
| |
|
Ronnie124
|
  |
| Joined: 26 Nov 2009 |
| Total Posts: 694 |
|
|
| 22 Jul 2011 01:48 PM |
Spawns = {"A","B","C"}
Player.CharacterAdded:connect(function(Char) Spawn = [math.random(1,#Spawns)] Char:MoveTo(Workspace[Spawn].Position) end) |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 22 Jul 2011 01:51 PM |
| There are major problems with that, Ronnie. |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 01:53 PM |
| Yeah, Workspace isn't a table. |
|
|
| Report Abuse |
|
|
Ronnie124
|
  |
| Joined: 26 Nov 2009 |
| Total Posts: 694 |
|
|
| 22 Jul 2011 01:53 PM |
| Oh really, tell me what's wrong with it. |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 01:54 PM |
| I mean Spawn = error/a number. |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 01:55 PM |
Spawns = {"A","B","C"} Spawn = [math.random(1,#Spawns)]
print(Spawn)
>Gives an error |
|
|
| Report Abuse |
|
|
Ronnie124
|
  |
| Joined: 26 Nov 2009 |
| Total Posts: 694 |
|
|
| 22 Jul 2011 01:58 PM |
| You used to be able to do that before the update. |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 02:02 PM |
Spawns = {"A","B","C"}
Player.CharacterAdded:connect(function(Char) Spawn = Spawns[math.random(1,#Spawns)] Char:MoveTo(Workspace[Spawn].Position) end)
This was the one: Spawn = Spawns[math.random(1,#Spawns)]
Now I'll just test it... |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 22 Jul 2011 02:06 PM |
| The MoveTo method works. Thanks Ron |
|
|
| Report Abuse |
|
|