H1998
|
  |
| Joined: 30 Mar 2009 |
| Total Posts: 3336 |
|
|
| 20 May 2013 08:00 AM |
| The MoveTo method only allows to set the position. What is the best way to rotate the entire model by script? |
|
|
| Report Abuse |
|
|
|
| 20 May 2013 08:07 AM |
fromEulerAnglesXYZ
http://wiki.roblox.com/index.php/CFrame
Soup's on, everybody! ~LuaLearners Writer~ |
|
|
| Report Abuse |
|
|
H1998
|
  |
| Joined: 30 Mar 2009 |
| Total Posts: 3336 |
|
|
| 20 May 2013 08:16 AM |
| Why are you telling me this? I have already been to that page dozens of times and nothing tells about rotating ENTIRE MODELS. Rotating them the same way you would in studio! |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 20 May 2013 08:49 AM |
function ModelCFrame(Model, NewCFrame) Model:MoveTo(NewCFrame.p) local Origins = {} for i,v in pairs( Model:GetChildren() ) do if v:IsA("BasePart") then Origins[v] = Model:GetModelCFrame():toObjectSpace(v.CFrame) end end for i,v in pairs( Origins ) do i.CFrame = NewCFrame:toWorldSpace(v) end end
ModelCFrame(Workspace.Model, CFrame.Angles(1,0,1)) |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 20 May 2013 09:54 AM |
| The torso is welded to all the limbs, just change the torso's CFrame. |
|
|
| Report Abuse |
|
|
|
| 20 May 2013 09:55 AM |
@mr
shes talking about models not players. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 20 May 2013 09:59 AM |
| I'm half asleep and not paying much attention, sorry. |
|
|
| Report Abuse |
|
|
slyguynl
|
  |
| Joined: 28 Mar 2009 |
| Total Posts: 20 |
|
|
| 20 May 2013 01:51 PM |
@pokemon
obviously h1 is as much of a girl as i am :) |
|
|
| Report Abuse |
|
|