|
| 11 Oct 2013 07:14 PM |
| Bleh bleh haven't been on this sub-forum in AGES, and I know this question gets asked like every 5 minutes, but when you search the question on Google it just comes up with videos of people giving mediocre tutorials on how to CFrame. |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Oct 2013 07:16 PM |
| That returns the model's CFrame, it doesnt allow you to edit it. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Oct 2013 07:44 PM |
| Of course you can't, because you cant CFrame a model with that method. |
|
|
| Report Abuse |
|
|
GGGGG14
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25344 |
|
|
| 11 Oct 2013 07:45 PM |
I have a model CF-Editor
model:MoveTo(Vector3.new(x, y, z)) |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:50 PM |
Okay, let me explain better: How can I rotate a model with a script?
|
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:52 PM |
for i,obj in pairs(workspace.model:GetChildren()) do if obj:IsA("BasePart") then obj.CFrame = obj.CFrame + CFrame.new(0, 0, 0) end end |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:54 PM |
function RotateModel(Model,Angles) local a=Angles for i,v in pairs(Model:GetChildren()) do if v:IsA("Part") then v.CFrame=v.CFrame*a else RotateModel(v,a) end end end
RotateModel(Model,CFrame.Angles(10,10,10))
Like that? |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:54 PM |
| Replace Part with BasePart sowwy |
|
|
| Report Abuse |
|
|
GGGGG14
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25344 |
|
|
| 11 Oct 2013 07:57 PM |
x = CFrame.new(0, 1, 0) for i, pos in pairs(game.Workspace.Model:GetChildren()) do if pos:IsA("Model") then pos.CFrame = pos.CFrame + x end end |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:58 PM |
| Yeah dude BasePart is more on wedges, truss etc. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:59 PM |
@GG
No you CFrame'd the model not the model parts. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 08:01 PM |
Thanks. I'm glad to see that all of the users on tihs subforum as of late aren't obnoxious as stephen. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 08:05 PM |
| However, to rotate a model, you'd have to do more than just rotate each part in a direction individually, you have to make each part picot around a certain point, and I have no idea how to do that. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 11 Oct 2013 08:44 PM |
dog, MoveTo changes it like position, it checks for collision detection.
You would have to use simple subtraction from the CFrame of where you are and use TranslateBy |
|
|
| Report Abuse |
|
|