AJ5613
|
  |
| Joined: 09 Jul 2013 |
| Total Posts: 34 |
|
|
| 13 Jun 2014 11:01 PM |
I found this script by stickmasterluke its supposed to rotate a model and im trying to rotate a dome made of 50 bricks but it lags it works fine in studio but it lags in a server --Made by Stickmasterluke wait() local tm = script.Parent.Dome function rotatemodel(model,center,rotation) while true do wait() for i,v in ipairs(model:GetChildren()) do v.CFrame =((CFrame.new(center)*rotation)*CFrame.new((v.Position-center)))*(v.CFrame-v.Position) end end end rotatemodel(tm,tm.PivotPoint.Position,CFrame.Angles(0,0.06,0)) --Peppy: DO A BARRLE ROLL!!
|
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 11:17 PM |
| The server likely can't handle the rotation calculations of all the objects. You have to remember each part in that has to be multiplied by Pi in order to rotate in a circle, so you're essentially doing that for 50 other parts. |
|
|
| Report Abuse |
|
|
AJ5613
|
  |
| Joined: 09 Jul 2013 |
| Total Posts: 34 |
|
|
| 13 Jun 2014 11:38 PM |
| Its not the server lagging its the bricks lagging as its trying to rotate the whole dome, Ive seen this done before so I know its possible any ideas on what may fix this? thanks that would be really helpful |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 11:40 PM |
Get my Model Flipper plugin, note the ID then in studio go
Insert -> Model
C:\Users\%username%\AppData\Local\Roblox\InstalledPlugins\
Open the one with the name if the ID of my plugin.
Take a look at the source. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Jun 2014 11:41 PM |
He doesn't want to do this in studio, read his post.
AJ, set the primary part and use the SetPrimaryPartCFrame method on the model |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 11:45 PM |
| I know he doesn't, the source can still help however. |
|
|
| Report Abuse |
|
|