|
| 14 Jan 2012 04:04 PM |
| Can you rotate an entire model with Roblox Lua? |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 04:05 PM |
Just use the toolbar
-Lua FTW |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 14 Jan 2012 04:23 PM |
| Using my secret method, it will work. I ain't tellin' it. |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
| |
|
Smirky
|
  |
| Joined: 05 Apr 2008 |
| Total Posts: 3598 |
|
|
| 14 Jan 2012 04:41 PM |
| Your secret method? It's Roblox Lua. If you aren't going to post something helpful here, don't post at all. Also, I think he means how to keep a model rotating with a script, not just rotate it for building purposes. |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 04:50 PM |
| Yeah like can you rotate a model with Roblox Lua? I really need to know how. |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 04:50 PM |
| Just using the toolbar won't help me :/ |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 05:16 PM |
| Is there no possible way to do it? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Jan 2012 06:21 PM |
i know its possible, i just don't know how.
~I've been to nil and back. |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 06:34 PM |
Yep you can and try this :
model = game.Workspace.Model
model:MoveTo((CFrame.Angles(0,math.pi/2,0)).p) |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 06:37 PM |
is it really that simple??? :O
~I've been to nil and back. |
|
|
| Report Abuse |
|
|
Cyrok
|
  |
| Joined: 11 Jan 2012 |
| Total Posts: 630 |
|
|
| 14 Jan 2012 06:42 PM |
@Luis
That will have no effect whatsoever. The MoveTo method doesn't rotate models, it just *moves* them, as the name suggests. But thanks for trying.
And I'm almost ninety percent sure that there's a way to do this, I remember someone posting about this a **while** back.
{ Have a short chunk of code that isn't working? Send me a message and maybe I can assist you. } |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 06:51 PM |
cmd utl is capable of rotating models, but i'm sure it requires some math.
~I've been to nil and back. |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 06:55 PM |
for i, v in pairs(workspace.Model:GetChildren()) do if v:IsA("Part") then v.CFrame = v.CFrame * CFrame.Angles(2,0,0) end end
Hurp. |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 10:08 PM |
@Above
That script wont work!
It just rotate all the parts not rotating the model |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 15 Jan 2012 04:01 PM |
The best method doing this would be:
lookvector* |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2012 04:06 PM |
| It's rather complicated. I will tell you that with a bit of knowledge about matrices it can be done. Probably, anyway. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 15 Jan 2012 04:33 PM |
This might work:
model = SOMEMODEL rotation = CFrame.Angles(x, y, z) cframes = {} main = CFrame.new(model:GetModelCFrame().p) for i, v in pairs(model:GetChildren()) do table.insert(cframes, v.CFrame:toObjectSpace(main)) end main = main * rotation for i, v in pairs(cframes) do model:GetChildren()[i].CFrame = v:toWorldSpace(main) end |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2012 04:37 PM |
| If you're desperate enough to do it without actually learning how, stravant has a script that does this. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 15 Jan 2012 04:38 PM |
| Or you can just copy and paste mine :P |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2012 04:41 PM |
If it works. :U
stravant has a reputation as a skilled scripter, so I trust him |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
| |
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 15 Jan 2012 04:45 PM |
| Well, that failed miserably D: |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2012 08:55 AM |
| Well I have to figure it out to make placing seats in a colosseum easier. |
|
|
| Report Abuse |
|
|