Need Help on Tracing the Issue of Lag Spike Brought By StepContacts

Our game shows occasional lag spikes that seem to happen at random intervals. I turned on the microprofiler so I can monitor the resource usage and I was able to record it here:

The link contains the video and the corresponding microprofiler dump. Upon checking, the longest duration pertains to calls to the stepContacts. The lag spike lasts longer for some of my tests but this is the one that I managed to capture in my recording for now.

For the few resources that I can find, I learned that the stepContacts label refers to the collision of objects as determined by CanCollide. The thing is, I set all the CanCollide properties of the parts of these patrolling enemies to false so I thought this should not happen anymore. The only ones with the collision enabled is the player and the pets that follow him/her. Also, when I remove all the patrolling enemies, the lag spike doesn’t seem to occur so I am leaning towards identifying the enemies as the source of the issue.

Given that there are no more parts that have CanCollide set to true for the enemies, is there anything else that I can check to see where this issue is coming from? Or is there anything else that I should check outside of the enemy objects that I am suspecting? Thanks in advance.

UPDATE: So turns out, two of the enemy model’s parts are forced to set their CanCollide properties to true even if my script sets it to false. Given that there are 121 enemy models in the place, does this account to such performance hiccup even with just the two parts (Lower and Upper Torso) set as collideable?

P.S. I checked the previous forum posts before that mention stepContacts but so far I can’t find anything that I can make use of on my problem.

Pretty sure they are referring to the number of contacts (touches), not Physical hits.
If you change the CanQuery and CanTouch properties of your enemies does that make a difference?

Thank you for your response. I tried your suggestion but unfortunately, it still has the occasional lag spikes. I uploaded a new dump and video with the applied changes.

For what it’s worth, I realized that there are two parts that have their “CanCollide” properties set to true again even after the I have set it to false. From what I have searched, it seems this is done by the humanoid that each of my enemy models has. There are currently 121 monster models running in the place. Do you think this can still affect performance even with just two parts (Upper and Lower Torso) set as collideable for each model?

I’ve heard places with a lot of Humanoids cause issues and your game seems to have a lot of them moving around in a pretty small area.
Would it be possible to load them in as needed in the game?

Thanks for your response. With the possibility that multiple players are scattered in the different areas of the place, that might be difficult to pull off. I need to update the location of each enemy model for each player (the enemies move from time to time). So just to clarify, the stepContacts were brought about by the presence of the humanoids in the place?