This was originally posted in the Building Support category but I didn’t get a response, and I’m unsure if this is some sort of scripting bug or building bug but I’m going to post here regardless because I am in need of help.
I’m trying to make a “skin” for a summoner character, and his summon part of the skin is giving me some issues. The way it works, is that it clones the pieces of the skin and puts them inside the corresponding part. They are also massless, to prevent any weight effecting the summon. For some reason, even though the parts are massless, they make the humanoid/model “lag”, any time it finishes a MoveTo(), it just freezes in place for a split second before continuing. This does not happen on the regular model, with no parts inside of its rig. What’s happening here? Is there anything i can do to fix it?
The model with the massless parts (stops for a second at waypoints)
The base model with no parts (does not stop for a second at waypoints)
The footage may be a bit laggy, since my PC is a bit slow to run studio and OBS at the same time.
Welds. The hierarchy is a little confusing, but i put some indicators as to whats what. Some of them are named the same because I assume names wouldn’t effect the mass. Cosmetics 1-3 are the skin, and rig cosmetic is apart of the normal Rig, which doesnt effect the movement either.
I also tried making these have mass but that didn’t work either.
Have you tried not nesting BasePart’s under BaseParts?
I know when I have done this before, it caused odd things to happen.
It was with a morph I made, and I had to put all the BaseParts as children under the main model or even in folders, then things worked for me.
I remember in an official update post a while back, some Roblox employee said you should never place a basepart under a basepart.
Well, it didn’t work. I made the script create a folder for the cosmetic parts and then dump them into said folder, the only children inside them being their welds. Still stuttering when walking.
Another thing to try…
Massless parts also act strange sometimes especially when connected to Constraints.
I have no idea if they act strange when connected to a weld, I would think not, but maybe just to rule out the massless thing, you could have your code set their physics properties to custom and set them at a very low mass.
Well at least we have ruled out 2 things, hopefully.
I really have no clue why it would do this, especially if its the same script and its only lagging with one type of rig (extra parts rig)
Have you tried it with only 1 or a few extra parts, instead of the full set? See if it lags less, or the same or not at all.
I tried deleting some of the children inside of the children (Mainly the glows), and still no improvement of performance unfortunately. I’m starting to lose hope because nothing I do has any effect on the bug. It’s weird cause i have many other models that have hierarchies like this and don’t bug out.
First and foremost, I’d recommend using weld constraints as opposed to welds, weld constraints work more reliably and are up to date.
Secondly, are you handling the movement on the server or client? If server, try moving on the client instead and handle important hit detections/character functions on the server.
Effects/cool moving things on client
Registration and functions/important things on server
(You can also do a hybrid of allowing hits on client without any checks foremost, then doing a double check on server so you can still stop possible exploits while having faster/better hit registrations)
Okay, I just found out something. When the summon spawns with the cosmetics, it falls over. And when it falls over, it messes up the MoveTo(). Sorry for wasting yall’s time with this bug, since it was nothing with the welds. Don’t know why I didn’t notice this until now. I appreciate all the help you two have given me though. If this however proves to not be the cause, I’ll be back.
Okay, it isn’t the falling/tripping. It just genuinely does not like the parts being welded to the basepart in any way. Whether it be welds, weldconstraints, motor6D’s, and being welded IN the part or in a folder outside the part. I’m genuinely incredibly stumped.
I noticed that the cosmetics and the rig didn’t have the same collisiongroup (even though the cosmetics aren’t cancollide anyway) and so I tried that and still nothing. Things I’ve tried so far:
Making the parts massless
Moving the parts into their own folder inside the model group
Changing Welds to WeldConstraints to even Motor6D’s
Changing the Density of each part to be the lowest value possible (0.01)
Making Collision Groups match
And through all that, I noticed that the Rig does not like having anything from the cosmetic welded to it. But magically works without cosmetics even though the base rig has baseparts already inside of it??? Could the problem be that applying welds/cosmetics through script be “bricking” it somehow?