I have a Chase AI that I wrote a couple years ago, and it has worked seamlessly for years with no bugs
I do need to mention the AI was originally made on a custom rig, not a default R6 or R15 one
It’s basically just supposed to activate the chase code when a player is spotted/in the line of sight of the model
This bug doesn’t happen with the original rig the AI was modeled off of
The problem is, is that the raycast is messed up for all my models I use it for
It seems to only see the player when the player is on the AI’s right or left side, or when the AI is on the player’s right or left side, and I don’t understand why? All help is appreciated
Also, I’ve looked all over the dev hub for solutions, and they all either give out errors, or the bug is unchanged
Here’s the code
(The code is much larger, this is just the raycasting part)
local SightRay=Ray.new(AI:FindFirstChild(“HumanoidRootPart”).CFrame.Position,(FoundTarget.CFrame.Position-AI:FindFirstChild(“HumanoidRootPart”).CFrame.Position).Unit*128);
local Hit,EndPoint=Game.Workspace:FindPartOnRayWithIgnoreList(SightRay,{AI});
Sorry if the fix is simple, I haven’t attempted to use this code in a little bit