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: Cframe Rotating Models

Previous Thread :: Next Thread 
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
01 Nov 2012 11:51 AM
So I want to make a cframed cylinder rotate... How can I do that?

(Only script I have for Cframe Rotation is for a part, not for a model.)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
01 Nov 2012 12:25 PM
bumpy
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
01 Nov 2012 12:58 PM
If you have CFrame for a part, why not just loop it for all the parts?
Oh yea, that might cause some havoc e_e
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
01 Nov 2012 01:11 PM
Uh yeah, hmm, lets see...

You can't make the cylinder rotate like that.
Report Abuse
ExoticEpicNinja is not online. ExoticEpicNinja
Joined: 06 Mar 2012
Total Posts: 4186
01 Nov 2012 01:22 PM
Ehr...idk ask your mom




~'Cause dinosaurs roar~
Report Abuse
TheGamer101 is not online. TheGamer101
Joined: 14 Feb 2009
Total Posts: 11943
01 Nov 2012 02:38 PM
Are you looking for something like this?

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

---example call :
ModelCFrame(script.Parent, script.Parent:GetModelCFrame()*CFrame.Angles(0,-math.pi/2,0))
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
01 Nov 2012 03:24 PM
I guess, I don't know how to use it though.
Report Abuse
TheGamer101 is not online. TheGamer101
Joined: 14 Feb 2009
Total Posts: 11943
01 Nov 2012 03:56 PM
You should mess around with it to try and figure it out.

CFrame.Angles(0,-math.pi/2,0))

Change the angle in here. The angle is in radians. pi radians is 180 degrees. So pi/2 radians is 45 degrees.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
01 Nov 2012 04:01 PM
Scary sounding...

I'll mess around with it.
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