Gun viewmodel FPS lags

Hi, I’m creating a Mobile Task Force game that uses my modified version of the FE gun kit. I use free models as my gun models and all the animations are done by my developers.

The issue I came across is strange but not rare to my surprise, I’ve encountered this issue in my other game and the most common thing between them is Welds, I thought it may have something to do with it so I tried deleting the welds but it still lagged horribly.

All of the guns have CastShadow off, CanQuery off, CanCollide off, CanTouch off.

I will show you guys a video so you can see whats happening.

Look at the top-left, you can see when I equipped HK416-S and M249 they started going down but it didn’t happen to the other guns.

Any help is appreciated, ty.

6 Likes

Bumping, haven’t gotten the solution to it, honestly baffled.

I apologize for the very late bump, but since this is the only topic I have seen related to my problems have you managed to know what causes this?

1 Like

It could be some poor optimization on the gun engine but we’d need to take a look into the source code to identify the problem; or just make your own

One of my play testers reported this to me as well in my game. That was over a year ago. As it turned out, the gun was made of a bunch of parts that were welded together. I mean a lot of parts…something in the 200-300 range. So each time the weapon was cloned to a player, the engine has to render that. The solution was to use meshes instead. There’s a time-consuming procedure that you can use to convert models into meshes.

Going from memory, the steps are something like this:

  1. Separate the parts by color and material.
  2. Place the groups in separate models.
  3. Export them from Roblox. They will be in an *.obj file.
  4. Import the *.obj files into Blender.
  5. Set the parts to origin (Look online to see how to do this).
  6. Export from Blender.
  7. Import the meshes into Roblox.

I’ve done this a few times, but I have to look up the Blender steps since I don’t really use Blender all that much. An alternative is to go on the web to sites like Sketchfab, buy them, and then import the meshes and visuals into Roblox. I’ve done a few guns that way.

1 Like

I found out why but never really made a post about it; essentially, my gun viewmodels had AnimSaves (the group that contains the keyframe sequences for animations), the performance decreases when you keep this in the viewmodel.

Could it just be too many triangles for the models?
Or possibly the welds?

Yeah, but that wasn’t the main factor for my issue.

Huh. I never considered that since I usually remove the animation saves before publishing. That’s something new to look for. Thanks.

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