So this might sound confusing. But Im trying to make a cover position for the npc to find cover and shoot the target.
Im trying to look in youtube and found the exactly what I need:
Unreal Engine 4 Tutorial - Shooter AI Pt.6 - Finding Cover - YouTube
But its in a UE4 and its also using a “Environmental query” If I heard it right. Which in case now doesnt have in Roblox. How could I do this? Please help!
since roblox raycasts are buggy when being used in loops. one easy way to do this is take a folder with all the walls and then loop to get to the closest wall to the npc(or player) then get that wall position minus that wall to player position unit (playertorso.Position-wall.Position).unit * wall size + 2. you add + 2 so npc can take cover near the wall