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
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 01 Nov 2012 01:22 PM |
Ehr...idk ask your mom
~'Cause dinosaurs roar~ |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 01 Nov 2012 04:01 PM |
Scary sounding...
I'll mess around with it. |
|
|
| Report Abuse |
|
|