|
| 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 |
|
|
|
| 30 Dec 2014 10:41 PM |
Primary Part m8. It's complicated. |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2014 10:55 PM |
not complicated lol
model:MoveTo(position) |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
|
| 31 Dec 2014 12:11 AM |
| Wait, I think it makes some more sense now that I read it in wiki |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2014 12:18 AM |
So do I have to set the primary part first beforehand or what?
|
|
|
| Report Abuse |
|
|