|
| 08 Aug 2014 03:39 AM |
| So I am trying to figure out a way to telleport someone to a random position on each grid. So for example, on the X Grid, a random position between 1 and 10. I don't know how this would be done as there are many positions that would need to be to be added. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2014 04:02 AM |
| Workspace.PlayerName.Torso.CFrame = CFrame.new(math.random(1,10),math.random(1,10), math.random(1,10)) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2014 04:15 AM |
I love math.random(). I used it to make randomly spawning-falling-rain drops once. c: |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 08 Aug 2014 04:16 AM |
local x = math.random(minimum,maximum) --fill these in with the numbers you want it to randomely choose from EX: math.random(1,10) would do a number between or including 1 and 10.
local y = math.random(minumim,maximum) local z = math.random(minimum,maximum) plr = "Put the player name here"
game.Workspace:FindFirstChild(plr).Torso.CFrame = CFrame.new(x,y,z) |
|
|
| Report Abuse |
|
|