NullReferenceException (Shooter 2)

If you encounter a NullReferenceException similar to the following after changing a part, preset, color, or bodyshape of your character:

Error: NullReferenceException (GameCreator.Runtime.Shooter.RigShooterHuman.UpdateFK)

Cause

HeroBridge works with Sidekick’s Runtime API, and under the hood it also relies on Game Creator 2’s API, specifically the Change Model method. Whenever you modify a part, color, preset, or bodyshape, HeroBridge triggers a model change using Game Creator’s Change Model method.

However, in Shooter 2, changing the character’s model while a weapon is equipped cause the RigShooterHuman system to lose its references, resulting in the NullReferenceException error.

💡 Tip:

A workaround for this issue is to store the currently equipped weapon and prop in local variables on the character.

Then, use the On Model Change trigger to:

  1. Unequip the weapon and prop.

  2. Wait one frame (for the model change to complete).

  3. Re-equip the weapon and prop using the stored local variables.

This ensures that the Shooter 2 rig properly reinitializes and restores all references after the model update.

A bug report has been submitted regarding this issue so it can be addressed in a future update of Game Creator 2.

Last updated