Try to avoid using ray hits because it has a very high cost for your game room. Think other way, if a bot can see your bastion then bastion also can see that bot that is why you are using
Is In Line of Sight (Bot, Bastion)
of each bot that comes to the bastion. And if it is true then check
Is In Line of Sight (Bastion, Bot)
to be sure there is nothing preventing bastion to see a bot. that’s all.
This way it costs much less and works 100%.
More info about me and my game mods you can find here.