|
| 29 Nov 2013 05:24 PM |
| I know how to rotate a part with a script but there isn't a property for the model, how would i do it to a model? |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Nov 2013 05:40 PM |
| You can use plugins that has those CFram things. I wish ROBLOX added properties to models so when you try to do it to one, all of its parts will not go into one area. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 05:42 PM |
sorry never heard plugins before where would you find these? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 05:43 PM |
| Google it or Bing it. Its super easy to install one. Well if you know how to already. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 05:44 PM |
part = Workspace.Part part.CFrame = part.CFrame * CFrame.Angles(math.rad(), math.rad(), math.rad())
Think of math.rad as a Circle. The entire circle is 360. If you enter math.rad(90) for example and its on the Y axis it will make a sharp twist. For more of an explanition of radians look it up on wikipedia, |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 05:48 PM |
Sorry I re-read it.
Basically;
function rotate(model, angle) for i, v in next, model:GetChildren() do if v:IsA("BasePart") then v.CFrame = v.CFrame * angle end end end |
|
|
| Report Abuse |
|
|
Sorexus
|
  |
| Joined: 13 Aug 2013 |
| Total Posts: 124 |
|
|
| 29 Nov 2013 05:50 PM |
| That would rotate the individual parts, not as a whole. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 05:55 PM |
| It rotates the whole model's parts therefore. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:11 PM |
this?
function rotate(Ship, angle) for i, v in next, model:GetChildren() do if v:IsA("Ship") then wait(3) v.CFrame = v.CFrame * angle end end end
--model name is "Ship" --this says rotate model 5 degrees |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:18 PM |
Nein.
function rotate(model, angle) for i, v in next, model:GetChildren() do if v:IsA("Ship") then wait(3) v.CFrame = v.CFrame * angle end end end
rotate(Workspace.Ship, CFrame.Angles(math.rad(.0875), math.rad(.0875), math.rad(.0875))) |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Nov 2013 06:24 PM |
QQ I didn't see a change you made.
function rotate(model, angle) for i, v in next, model:GetChildren() do if v:IsA("BasePart") then wait(3) v.CFrame = v.CFrame * angle end end end
rotate(Workspace.Ship, CFrame.Angles(math.rad(.0875), math.rad(.0875), math.rad(.0875))) |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:29 PM |
| it didn't rotate the model after 3 seconds |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Nov 2013 06:37 PM |
| No it did but you do not realize how little 5 degrees is in radians you need a bigger number. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:40 PM |
| i used 45 for the y instead of you numbers |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:50 PM |
heres what i used function rotate(model, angle) for i, v in next, model:GetChildren() do if v:IsA("BasePart") then wait(3) v.CFrame = v.CFrame * angle end end end
rotate(Workspace.Ship, CFrame.Angles(math.rad(0),math.rad(45),math.rad(0))) |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:54 PM |
I just tried it.
Do this instead though.
function rotate(model, angle) wait(3) for i, v in next, model:GetChildren() do if v:IsA("BasePart") then v.CFrame = v.CFrame * angle end end end
rotate(Workspace.Ship, CFrame.Angles(math.rad(0),math.rad(45),math.rad(0)))
Also make sure Workspace.Ship exists. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 06:59 PM |
oh yeah that should work i knoticed everything was rotating every 3 seconds im stupid XD |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 07:08 PM |
@flat can you come to my sinking ship game and explain why what happens happens please. I'll visit your place or something to give you an extra ticket. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 07:12 PM |
| Is the problem each part is rotating around it's central axis, and not the model's central axis? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 07:18 PM |
model:GetModelCFrame()
function rotate(model, angle) wait(3) for i, v in next, model:GetChildren() do if v:IsA("BasePart") then set = model:GetModelCFrame() * angle v.CFrame = v.CFrame * set end end end
rotate(Workspace.Ship, CFrame.Angles(math.rad(0),math.rad(45),math.rad(0)))
To fix that you'd just do the above. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 07:35 PM |
that script made parts even worse. both scripts made the whole model messed up |
|
|
| Report Abuse |
|
|
| |
|