Seems like you are duplicating the raycast’s work by using intersect_ray. You could get the colliding target with aimcast.get_collider(). Your ray query is probably causing the issue as the start point is using a local-space muzzle position, rather than global position, again make use of the ray cast’s get_collider() function instead of this.