So I’ve got a zombie that will wander around until it detects a player (using a ray shot from the zombie’s front) where it then follows the Player’s HumanoidRootPart directly. If the player leaves the zombie’s line of sight, the zombie then switches to using the pathfinding service. This system works great except if I were to lets say, go up some stairs, it’ll be stuck on the 1st method of movement because I’ll still be in its “line of sight” but an entire floor higher. How do I get around this?
As you can see in the picture above, the zombie just goes under it, instead of using the pathfinding service to detect a path via the stairs to get the player. Just to be more clear, I’m asking if someone could explain the logic or a way that I could detect if a player is on another floor, so that I can toggle the path service in the zombie.