ivanloi0
|
  |
| Joined: 08 May 2012 |
| Total Posts: 345 |
|
|
| 07 Jul 2013 09:40 AM |
Hi, I'm trying to move an obejct to a random SpawnPoint (I have "SpawnPoint0" through to "SpawnPoint8"). Here is my script:
local x = (math.random(0,8)) Object:MoveTo(Workspace.SpawnLocations "SpawnPoint" .. x.Position As you can probably guess, I want the object to be moved to the position of the spawnpoint that has the random number "x" at the end, can anyone fix this for me? |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 07 Jul 2013 09:43 AM |
math.randomseed(tick()) local x = math.random(0,8) Object:MoveTo(Workspace.SpawnLocations["SpawnPoint"..x].Position) |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 07 Jul 2013 09:45 AM |
Question^
What does the first line of your script do? |
|
|
| Report Abuse |
|
|
ivanloi0
|
  |
| Joined: 08 May 2012 |
| Total Posts: 345 |
|
|
| 07 Jul 2013 09:45 AM |
| You are clearly another evil genius! Would you like to help me in my quest for world dominominoation? |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2013 09:47 AM |
ivan can't tell if trolling or too young for the forums. |
|
|
| Report Abuse |
|
|