As I’m sure most people know by this point, I have a snake character in my game.
It’s made of a chain of ballsockets connected to the HumanoidRootPart, and it works very well in most cases. However, recently I added a new creature that’s somewhat heavy and has a longer rootpart than most other creatures.
When this creature jumps on the snake, it causes the ballsocket chain to freak out, explode, and violently launch parts in all directions.
But this is not the problem.
The problem is that extremely occasionally when the character explodes, the player loses network ownership of their own character, and I can’t seem to prevent it from doing this, or even set it back to the player.
I’ve also experienced smaller, simpler creatures with short ballsocket chain tails doing this while moving normally. (In these cases, they spontaneously teleport to 0,0,0, get stuck in the ground, and experience #1 from below)
(The console errors are not important)
https://gyazo.com/9b6ecc6dca7cce78cd91583ace41ac36.gif
When they permanently lose network ownership, several strange things can happen.
- The affected character will have extreme latency in their movement and blink out of existence, lose control of their camera, and see all shadows in the world disappear periodically. The character can also flop around when this happens. In my repro, one time I kicked them off the edge of the baseplate and they respawned still in this affected state.
- Sometimes if the other character is interacting with the affected character as it enters this weird network ownership state, they can become inexplicably invisible locally. However, they can move fine, all their parts still exist, are in the correct locations, and have the correct children and properties, and other clients and the server still see them properly. Putting any new parts into the character will also result in them becoming invisible too.
While testing this in my game, when jumping on the snake there was also a small chance I would inexplicably permanently lose the ability to jump, but everything else appeared to work fine. Didn’t get that to happen in my repro, but maybe I haven’t tried enough.
All of this happens here, but it can be very difficult to reproduce:
I have the repro file from the videos above available upon request, since I don’t want to leak my characters. A more general repro file will take me too much time to produce, since character mass is important to causing this. Attempting to cut down the repro file stopped this effect from happening, and I don’t have time to try to tune it so it happens again.
The steps to reproduce are as simple as:
- Grind the snake’s face into the lizard
- Have the lizard jump on the snake’s head
The earliest report I have of this issue is from June 5, 2018, but back then it was triggered by separating the physically simulated part of your character from the rootpart by a very large distance and letting it try to reconnect to your body through parts in the map. (Teleport tool before I fixed it to properly move tails)