generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Roblox » All Things ROBLOX
Home Search
 

Re: Easy scripting question how do i make a script spawn someth

Previous Thread :: Next Thread 
UPumpkin is not online. 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 is not online. Kamov
Joined: 07 Aug 2008
Total Posts: 29015
27 Aug 2015 04:38 PM
:clone()
math.random()
Report Abuse
ediee544 is not online. 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 is not online. UPumpkin
Joined: 26 Jan 2010
Total Posts: 590
27 Aug 2015 04:40 PM
Wow thx
Report Abuse
EnergyCell is not online. EnergyCell
Joined: 11 Jan 2009
Total Posts: 2306
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 is not online. 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
LordVarioux is not online. LordVarioux
Joined: 13 Jul 2015
Total Posts: 1375
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 is not online. 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 is not online. Kelethe
Joined: 15 Aug 2011
Total Posts: 924
27 Aug 2015 05:50 PM
because MoveTo cant be used in parts
Report Abuse
LordVarioux is not online. LordVarioux
Joined: 13 Jul 2015
Total Posts: 1375
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
EnergyCell is not online. EnergyCell
Joined: 11 Jan 2009
Total Posts: 2306
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 is not online. UPumpkin
Joined: 26 Jan 2010
Total Posts: 590
27 Aug 2015 05:54 PM
Thxxx
Report Abuse
Glowiey is not online. Glowiey
Joined: 16 Aug 2015
Total Posts: 1985
27 Aug 2015 05:55 PM
^^^^^^^^^^^


My stick is glowiey
Report Abuse
UPumpkin is not online. 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
EternaIGod is not online. EternaIGod
Joined: 01 Apr 2011
Total Posts: 23592
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 is not online. 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
EternaIGod is not online. EternaIGod
Joined: 01 Apr 2011
Total Posts: 23592
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 is not online. 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
EternaIGod is not online. EternaIGod
Joined: 01 Apr 2011
Total Posts: 23592
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 is not online. UPumpkin
Joined: 26 Jan 2010
Total Posts: 590
27 Aug 2015 08:17 PM
group what?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image