LogService MessageOut doesnt work ingame. What do i replace it with?

Hmm, my best guess is that it’s a memory issue. I can’t see exactly what it is, but my best guess would be that the viewmodel isn’t being completely destroyed.

Even though it can’t be found anywhere in the game, some info associated with it might be sticking around somewhere in memory, which can cause weird issues (like the camera’s CFrame multiplication stacking).

Best thing I can think to do would be to create the viewmodel when the weapon is added to the player’s general inventory (starterpack, folder in ReplicatedStorage, ServerStorage, etc.), and move the viewmodel back and forth from ReplicatedStorage on equip/unequip. It can save on performance quite a bit.

Also, I’d recommend putting the variable for the camera at the top of the script outside the main SetupViewModel function, and move the moveCameraUp function outside as well. I’m getting a funny feeling about those being made every time the viewmodel is created also.

2 Likes

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