I assigned a script to "on hit" in a ranged weapon, and everything works fine- script executes, when the projectile hits any npc, but if not- projectiles stays in walls and on the floor and console blows up with the same error - "Entity must be a character". Is there a way to check if $target is an entity?