Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Obby with moving parts is extremely laggy?

Asked by 6 years ago

I built an obby that has about 20 moving objects. These objects are either just spin, rotate, or move side to side. I thought that Roblox could handle this sense it's really not that complicated of motion, but even just having these 20 moving objects seems to be significantly lagging the game. Does anyone have any idea why this might be, or how I could optimize it? I can post an example code of one of my moving parts if it helps.

0
Do you move everything with code or do you use BodyMovers aswell? Amiaa16 3227 — 6y
0
I move everything with code using CFrame GarryGecko99 30 — 6y
0
Perhaps try moving some stuff with BodyMovers and see if it's less laggy? Amiaa16 3227 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Ok, so Roblox doesn't handle moving parts on server-side very well. What I do to avoid laggy parts and such, is made everything local-side. What you can do is make a local script in playerScripts that parents all the parts you need into game.Workspace.CurrentCamera, and then move them from client side. This will prevent the server from owning them, reducing server-side replication to the client. Hope I could help, If you have any question post them on this answer. Have a great day!

Ad

Answer this question