ViewportFrame lagging

this is going to be very confusing but ill try my best to explain:

Goals:

  • Create a car spawner where car model button rotate

Issues:

  • When test playing, cars buttons viewportframes lag

video/image of issue:

https://gyazo.com/e745a0f2fe94a098494fe2f5ecdde305.mp4
picture of script: https://cdn.discordapp.com/attachments/1077451911420194896/1136814538507944027/image.png

solutions tried:

Thank you for any and all help, it is GREATLY appreciated

EDIT: It should be noted that the issue is not related to my fps as i can move around freely without any frame issues.

1 Like

Use a separate script for every viewport frame, or loop through each viewport frame and use task.spawn(function() for each new frame

1 Like

tried, but unfortunately it is still lagging

How about using Motor6D? It might remove the lag as it doesnt require a script to make it move.

Try replacing the cars with a normal brick, if it doesn’t lag, try rotate the viewport camera position instead of the entire car model.
It seems like the engine is having a difficult time constantly updating each descendant’s position and orientation.

have you tried remove all wait() from RenderStepped yet?

Hi, this is eventually not an issue, roblox does that on purpose, it throttles your viewportframes depending on the amount of insrances in it , and how fast your machine is.

temporary fix:

To get around with the throttling, you need to make sure your graphics are set to max, this will lead to viewportframes to update in realtime (almost).

If this resolved your issue then please let me now by either telling me , and or marking my reply as solved.

1 Like

My best guess, you have too many viewportFrames being rendered at the same time… Try only rotating the car if the frame is being hovered/clicked on.

1 Like

thank you! this was a good solution

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.