|
| 25 Dec 2014 02:36 AM |
| Is there a way to do this? Like, say I have a house, and I want it to rotate 10 radians whenever a button it pressed, how could I rotate the house all at once. I know it's possible to rotate each individual brick and then use some fancy math to place them in the right spot, but that seems like it would take a lot of calculations. Is there any other way? |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Dec 2014 03:07 AM |
So no one knows how to rotate entire models?
(Insert sad face here) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 25 Dec 2014 03:32 AM |
Why does everyone have a problem with this.
local model = game.Workspace.Model model.PrimaryPart = (model:GetChildren()[math.random(1,#model:GetChldren())]) model:SetPrimaryPartCFrame(mode.PrimaryPart.CFrame * CFrame.Angles(0,math.rad(90),0)) |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2014 03:37 AM |
| Because the wiki does explain it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Dec 2014 03:45 AM |
| And that script breaks sometimes. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2014 03:47 AM |
| With the error "20:46:29.658 - std::bad_cast" |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2014 03:52 AM |
| Now fixed with some minor adjustments |
|
|
| Report Abuse |
|
|