Strange Client Physics Bug

For a few months now, my game has had this issue where in seemingly random situations the character’s position would be set to infinity (or nan, nan, nan). As a result, the player loses control of their character (similar to the behavior that happens when a player attempts to control a character they may not have network ownership of) Or, more detrimentally, upon the character being set to infinity/nan this causes a client crash on all platforms.

I do have a video of the first scenario, but not of the second, however, I’m sure whatever this problem is is causing both.

Situations where it seems to happen:

  • Using any sort of physics-mover legacy or not (alignposition, alignorientation, bodyvelocity) etc
  • CFraming the character in succession
    ex:
    repeat Character:PivotTo(CFrame) until (false)
  • Just randomly. I know it seems like I typed this out of frustration, but I’m not even kidding. It literally happens randomly sometimes as well.

What I’m asking for is some advice. It’s clear that the issue lies somewhere within my game, (because I tested the following code Im about to share and it happened in my place and not a brand new baseplate), but I’m not sure where and I’ve been desperately trying to fix this for weeks now.

Final Notes:

1. I know for SURE this is a client issue because whenever this glitch happens, the server shows that the character is in their intended position and everything seems fine.

  1. I’ve done my best to replicate the exact conditions between my game and the new game, but based on the information in (1), I’m not sure what else I can really do.

  2. Publishing my game as a new place will cause the bug to carry over.

  3. I’m 99.9% sure there are no viruses in my game, I’ve combed through all the source available many times and haven’t seen any malicious code.

Videos:

External Media External Media

The baseplate is the new place while the game on the left is my game.

tl;dr: Very impactful physics bug making my game unplayable, happens randomly, and I have yet to fix it, if you know any situation similar to mine, please direct me to it so I can do my best to fix this.

EDIT: if anyone knows how to embed videos, that would be great, I’m aware most don’t like to download files and those are streamable.com links but they are embedding as files for some random reason.

EDIT 2: however, feel free to copy and paste: [streamable.com / wfe3ud] (spaces removed), [streamable.com / v9f5rs]

1 Like