How heavy is this, and how heavy could it be?

while wait(.04) do
    script.Parent.CFrame = script.Parent.CFrame*CFrame.Angles(0, 0, 0.1)
end

I’m rotating a part 360. There could be up to 200 of these parts in the game. I wouldn’t have 200 scripts of this of course I would do something like :GetChildren(). How much would this take a toll on game quality?

Is it a case by case question?

I would run this code on the client, to reduce the server load and run it with BindToRenderStepped so that it will be smooth no matter the FPS.

The least resource intensive answer would be to make an animation if it spinning, but with 200 objects that doesn’t sound realistic.

2 Likes

It’ll be laggy just by virtue of the fact you’re doing while wait(n) do, especially if that’s on the server.

Instead, just use RenderStepped and loop over all the matching parts (perhaps with CollectionService:GetTagged).

1 Like