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 » Scripting Helpers
Home Search
 

Re: Rotating Models?

Previous Thread :: Next Thread 
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
14 Jan 2012 04:04 PM
Can you rotate an entire model with Roblox Lua?
Report Abuse
FreeGamesROBLOX is not online. FreeGamesROBLOX
Joined: 15 Jun 2011
Total Posts: 6622
14 Jan 2012 04:05 PM
Just use the toolbar

-Lua FTW
Report Abuse
Miro034 is not online. 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 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
14 Jan 2012 04:24 PM
Yes, you can.
Report Abuse
Smirky is not online. 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
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
14 Jan 2012 04:50 PM
Yeah like can you rotate a model with Roblox Lua? I really need to know how.
Report Abuse
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
14 Jan 2012 04:50 PM
Just using the toolbar won't help me :/
Report Abuse
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
14 Jan 2012 05:16 PM
Is there no possible way to do it?
Report Abuse
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
14 Jan 2012 06:10 PM
Nothing? D:
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
14 Jan 2012 06:37 PM
is it really that simple??? :O

~I've been to nil and back.
Report Abuse
Cyrok is not online. 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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
14 Jan 2012 10:08 PM
@Above

That script wont work!

It just rotate all the parts not rotating the model
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
15 Jan 2012 04:01 PM
The best method doing this would be:

lookvector*
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. 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
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. 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
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
15 Jan 2012 04:42 PM
I'll test it...
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
15 Jan 2012 04:45 PM
Well, that failed miserably D:
Report Abuse
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
16 Jan 2012 08:55 AM
Well I have to figure it out to make placing seats in a colosseum easier.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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