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.
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!