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: WHY DOES THIS ????!!!

Previous Thread :: Next Thread 
AJ5613 is not online. 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
Irishvampire99 is not online. Irishvampire99
Joined: 09 May 2009
Total Posts: 255
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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
13 Jun 2014 11:45 PM
I know he doesn't, the source can still help however.
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