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 » Game Creation and Development » Scripters
Home Search
 

Re: Scripting question

Previous Thread :: Next Thread 
thetommygun is not online. thetommygun
Joined: 21 Mar 2011
Total Posts: 6159
30 Dec 2014 10:34 PM
How do I make it so that a model moves to a specific place on the map when a button is clicked?
Do I use cframe? If so, how do I move the whole model
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
30 Dec 2014 10:41 PM
Primary Part m8.
It's complicated.
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
30 Dec 2014 10:55 PM
not complicated lol


model:MoveTo(position)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
30 Dec 2014 11:00 PM
There are two ways you could do this.

If you're not expecting anything to be in the way of the position you're moving to then you can use the :MoveTo() method.

Otherwise, use the :SetPrimaryPartCFrame() method.

MoveTo example;

local model = workspace.Model
model:MoveTo(Vector3 Positon)

SetPrimaryPartCFrame example;

local model = workspace.Model
model.PrimaryPart = model[math.random(1,#model:GetChildren()))
model:SetPrimaryPartCFrame(CFrame position)
Report Abuse
thetommygun is not online. thetommygun
Joined: 21 Mar 2011
Total Posts: 6159
31 Dec 2014 12:09 AM
Any simpler methods?
Report Abuse
thetommygun is not online. thetommygun
Joined: 21 Mar 2011
Total Posts: 6159
31 Dec 2014 12:11 AM
Wait, I think it makes some more sense now that I read it in wiki
Report Abuse
thetommygun is not online. thetommygun
Joined: 21 Mar 2011
Total Posts: 6159
31 Dec 2014 12:18 AM
So do I have to set the primary part first beforehand or what?
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