I am trying to teach myself game development and coding with unity. To do this I am making a simple 2d platformer. I have been studying tutorials by unity, Brackeys, Sykoo, and blackthorprod. Using code from Blackthorprod’s patroling 2d ai tutorial i made a Trex enemy that wont fall off a cliff. Next I added another version of the same script that I modified to make it so the Trex will turn around if it hits a wall. This script worked great except for one problem; when ever my player walks in front of it, the Trex detects his collider and runs away ( not befitting a massive predator). I would like to make it so any collider tagged “Player” will not set off the Raycast. I will provide a picture of my script to help. Any advice is much appreciated.