Quirky Humanoid Behavior Setting Position and Orientation

I’m working on a hacky project which requires me to make some significant changes to the players’ character models. So far, I’m deleting every instance in the character model except the humanoid, head, torso, and humanoidRootPart. And yes, the server is set to force R6 rigs only. Then I resize each part to be a size of Vector3.new(-1,-1,-1) and weld the head and torso to the HRP with no offset/orientation. I also set the HipHeight of the humanoid to .05. Initially the server anchors the HRP and un-anchors it after it sets it to be in a select spot (above an anchored ‘floor’ part). The character bounces a bit off the floor until it settles which is when the quirky behavior happens; it seems to disappear instantly. I logged the position/velocity of the HRP on the server heartbeat to figure out if it was flinging at unrecognizable speeds or jumping to a new position.
The results were indicative that the part was being teleported to the exact position of Vector3.new(-1,-1,-1) at a velocity of Vector3.new(0,0,0). The humanoid health also stays at 100 through the process. I’ve isolated and checked the rest of my game code, and I’m 99.9% sure there is no script collusion during the process. I have a suspicion the problem is stemming from altering the character to such an extreme degree. Anyone have any idea what’s going on?

1 Like

May I suggest you try reducing the amount of parts deleted to see if there is a point where it works ok?

I recreated the same scenario with no alterations made to the character (except for anchoring and un-anchoring the HRP), and the same result occurred. I then did the same test except before-hand, I deleted every script in the game. Same result. This is getting ridiculous at this point…

I finally figured out the issue. In short, this bug happens when the network owner of the character changes to nil. Can’t elaborate on any specifics past that, other than the reason the network ownership was changing on me was because the client’s camera was separated too far from the character (or so I assume). The ‘glitch’ I’m referring to sets the character’s HRP position to Vector3.new(-1,-1,-1) - might be default Vector3.new(0,0,0) but mine might be different due to parts with cancollide set to true positioned at Vector3.new(0,0,0) - and it sets the orientation of the HRP to be flipped upside down. My solution was to just :SetNetworkOwner() of the HRP to its player on .Stepped on the server. Hopefully this can be a reference to someone else with this nightmare.

1 Like