RunService BindToRenderStep in CameraModule causing huge camera movement lag when server gets old

I want to remove the lag (likely but not 100% sure) caused by the CameraModule.

When a server becomes older, you start lagging when you move your camera around (especially around thin objects if this helps). Now looking at the memory usage i’ve found this so is this the issue or is it probably somewhere else? This just doesn’t look right so…

Because theres a gun system that hasnt been made nor implemented into the game by me, there is a custom PlayerModule. I dont think this is the issue though because the CameraModule compared to the one that would get added is the same.

What would you recommend I should do to fix this lag?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Memory usage says its coming from RunService.BindToRenderStep.
image

(Example when you lag)
https://gyazo.com/e90821e3deff8f328a4c753173aeb307

You’re connecting a function but then never disconnecting it. You could try disconnecting it after a certain amount of time.

Try using RunService:UnbindFromRenderStep() to do this.

Its the roblox CameraModule. I didnt even write this script, roblox did.

It might be an error with the custom player module, since there is nothing else it could really be. You should probably check that over.