I have a problem, which is tools creating lag depending on how many connected parts are inside.
I need to know if you can fix it, and how, without replacing the tools with versions that have less parts.
You may not be able to see the frame loss very well, but the spike on the microprofiler.
The frame loss doesn’t last forever, but for a set amount of time after equipping/unequipping the tool.
I weld the tools together in studio.
Parts in tools are connected with Motor6Ds if they are being animated, and are welded if they’re not being animated.
All parts in the tools have:
CanCollide = false
CanTouch = false
CanQuery = false
Massless = true
The tool being shown in the video has the most parts out of any tool, making it the laggiest.
Other tools have the same issue, but not as strong.
I use the default roblox tool equipping and unequipping system.
Some tools that are not equipped, are cloned and welded to a part of the character, so you know what they have. These tools appear and reappear when you unequip or equip the tool.
Unequipped = Tool can be seen on character
Equipped = Tool cannot be seen on character
This, however, makes the lag worse.
I’m doing all that on the client for all players. All i do is clone the tool, weld it back together as a model (using only welds), and weld it to a part on the character.
It still lags, without cloning the tools onto the character, albeit less.
I did find several posts talking about something similar, but i didn’t find a solution.
I hope this is fixable, because i don’t want to remove the tool models on the character or replace tool models.