My viewmodel keeps randomly disapearing

I’ve been trying to make a viewmodel… I succsesfully made one but realized after 2 months that if you stay in the game for a reasonable amount of time it just gets deleted. Sometimes the whole viewmodel, sometimes just the parts of it.
My viewmodel consits of a Humanoid and i thought it had something to do with that, so i deleted it but this time the whole model gets deleted.
The Viewmodel is parented to the camera, so i tried parenting it to a different instance(workspace, playermodel, etc.). Still nothing :frowning:

This is how the viewmodel is made:

and this is after it gets deleted:

Any help would be appreciated :slight_smile:

1 Like

Im pretty sure its streaming issue.
If your model in workspace before you Model.Parent = ... it to different location, then parts in model streamed off.
You can read about this here:
https://create.roblox.com/docs/workspace/streaming

1 Like

You could be right but the Docs says that Instances Stream off only if they are reparented, newly created or cloned and mine just excist till it decide to randomly vanish. Also if i turn streaming off entirely it doesn’t change much.

How does the system work? More specifically, the viewmodel rendering? Perhaps something is going on in that function?

i made the scripts and the redering based on this Post:

Just to make sure, the viewmodel only exists on the client, right? If so, then it should not be affected by StreamingEnabled at all

I wonder if your viewmodel is falling out of the map somehow and it’s getting destroyed in the void, this could be caused by having all parts in the gun be unanchored. Can you check that your HumanoidRootPart is anchored?

1 Like

THANK YOU SO SO MUCH BRO! i have been trouble shooting this for over a month now… It was a real motivation killer for me but now that i got that out of the way i will try to work on my project more again!

1 Like

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