UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
|
| 27 Aug 2015 04:37 PM |
how would i make it so that the scripts spawn something in a certain location for example
i want a pizza to spawn in a random location between (10,10,10 and 20,20,20)
Thanks |
|
|
| Report Abuse |
|
|
Kamov
|
  |
| Joined: 07 Aug 2008 |
| Total Posts: 29015 |
|
| |
|
ediee544
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 2175 |
|
|
| 27 Aug 2015 04:38 PM |
local a = game.Workspace.Pizza:Clone() a.Parent = game.Workspace a:MoveTo(Vector3.new(math.random(10,20),math.random(10,20),math.random(10,20)) |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
| |
|
|
| 27 Aug 2015 04:42 PM |
| Be sure that the Pizza can be found, I reccommend you changing the parent of the pizza to serverstorage. |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
|
| 27 Aug 2015 05:45 PM |
Why wont this work
local a = game.Workspace.Pizza:Clone() a.Parent = game.Workspace a:MoveTo(Vector3.new(math.random(10,20),math.random(10,20),math.random(10,20)) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 05:46 PM |
Ask Scripting Helpers. I'd help you, but I'm lost on if you mean from the lighting, or make an actual pizza mesh.
~LordVarioux #TeamVarioux |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
|
| 27 Aug 2015 05:49 PM |
| I just want a blocked called pizza to teleport to random locations |
|
|
| Report Abuse |
|
|
Kelethe
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 924 |
|
|
| 27 Aug 2015 05:50 PM |
| because MoveTo cant be used in parts |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 05:50 PM |
Ask the scripting helpers sub forum, they take longer but won't be as lazy as me.
~LordVarioux #TeamVarioux |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 05:50 PM |
local a = game.Workspace.Pizza:Clone() a.Parent = game.Workspace a.Position = Vector3.new(math.random(10,20),math.random(10,20),math.random(10,20)) |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
| |
|
Glowiey
|
  |
| Joined: 16 Aug 2015 |
| Total Posts: 1985 |
|
|
| 27 Aug 2015 05:55 PM |
^^^^^^^^^^^
My stick is glowiey |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
|
| 27 Aug 2015 07:52 PM |
Wont work
local a = game.Workspace.Pizza:Clone() a.Parent = game.Workspace a.Position = Vector3.new(math.random(45,-11),math.random(25.5,25),math.random(1,50))
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 07:53 PM |
Group it as a model
"Live a life you will remember" http://www.roblox.com/MEH-item?id=289870799 |
|
|
| Report Abuse |
|
|
solarDEV
|
  |
| Joined: 23 May 2014 |
| Total Posts: 1767 |
|
|
| 27 Aug 2015 07:54 PM |
| Is the block named Pizza or pizza? It's case sensitive. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 07:56 PM |
"local a = game.Workspace.Pizza:Clone() a.Parent = game.Workspace a.Position = Vector3.new(math.random(45,-11),math.random(25.5,25),math.random(1,50))"
local p=game.ReplicatedStorage.Pizza:Clone().Parent=game.Workspace p:MoveTo(Vector3.new(math.random(45,-11),math.random(25.5,25),math.random(1,50)) idek
"Live a life you will remember" http://www.roblox.com/MEH-item?id=289870799 |
|
|
| Report Abuse |
|
|
abcooocba
|
  |
| Joined: 13 May 2010 |
| Total Posts: 2468 |
|
|
| 27 Aug 2015 07:57 PM |
i believe math.random(a, b) only works if b is greater than a
Trained on the Road of Ultimate. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:00 PM |
group it first btw :P
"Live a life you will remember" http://www.roblox.com/MEH-item?id=289870799 |
|
|
| Report Abuse |
|
|
UPumpkin
|
  |
| Joined: 26 Jan 2010 |
| Total Posts: 590 |
|
| |
|