Error while processing packet: Variant cast failed (packet id: 131, packet length: 70)

If the character respawns while switching tools in a networked game, the following error occurs on the server:


This error causes the player to disconnect, with this message displayed on their screen:

I’ve provided a simple repro place here:

I don’t actually know what causes the bug, but I reproduce it by making an ‘evil brick’ that simply respawns the player’s character when touched. I also have a LocalScript that rapidly alternates between three tools in the player’s backpack on each heartbeat of the RunService. This LocalScript is key to making the error happen, as it ensures the two events will coincide with each other.


This is actually a big issue in swordfighting groups from what I’ve heard as users tend to equip tools right after they respawn.

1 Like

so in theory any place with tools and the ability to die can be crashed with a simple macro?

I don’t know if it actually breaks the entire server. I think it only disconnects the client that triggered the error. To clarify, the game doesn’t crash when this error is triggered; It logs the error and then disconnects the player.
I need to test this further with multiple players to see if it’s actually disconnecting everyone.

Thank you for the repro! We think we have discovered the underlying issue. If we are right, the fix will be going out the week of January 15th.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.