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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: MoveTo Not Working...?

Previous Thread :: Next Thread 
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
17 Apr 2016 10:33 PM
local map = game:GetService('ServerStorage'):FindFirstChild('Maps'):GetChildren()
local choose = (map[math.random(1, #map)]):clone()
choose:MoveTo(Vector3.new(0, 0, 0))
choose.Parent = game.Workspace
Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
17 Apr 2016 10:38 PM
Am I using it wrong..?
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Apr 2016 10:41 PM
--You dont need to use getservice since serverstorage is already part of the datamodel and findfirstchild is for true or false operations.

local map = game.ServerStorage.Maps:GetChildren()
local ranMap = maps[math.random(1,#maps)]:Clone()
ranMap.Parent = workspace

--You dont need to use vector3 here. Just drag the map in studio to the place you want it to clone.


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Apr 2016 10:42 PM
local maps *


Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
17 Apr 2016 10:42 PM
^ The Point is, I want to use MoveTo...
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Apr 2016 10:43 PM
Well then use moveto after all of that.


Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
17 Apr 2016 10:44 PM
Same thing happens: 'MoveTo is not a valid member of Part'
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Apr 2016 10:45 PM
MoveTo can only be used on a Model


Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
17 Apr 2016 11:34 PM
Assuming its a part, just change the .Position property.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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