The issue is that HiveIsDead is contained in the hive itself. If you destroy the hive, you are removing the variable, and the level can’t reference it. You can do one of two things:
- Leave the hive in the game (don’t destroy it) and set the visibility to hidden. This can be less memory efficient if you intend to garbage collect the asset.
- Store the ‘hive is dead’ variable within your GameMode (single player) or GameState (replicated) class. Then you call your game mode and reference the variable from it.