I am creating an enemy for my Backrooms Game, and while everything has been working so far, progress has come to a screeching halt for three days now as I have tried to fix this problem.
So, basically, I have a whole pathfinding script for the enemy to track you down. Here is the problem, when it gets close the the player, it just cant reach it when the player is moving, no matter how fast it is. I believe this is because the enemy reaches its walkto point before it can set another, causing it to stay just out of reach from the Player.
Yes, I have created a separate loop which runs if the enemy is close to the player, and yes, I have tested to make sure it is actually running this loop. I have been searching up fixes for three days now and have made very slow progress. I have set all parts/unions server ownership whatever to nil, and basically anything you can find for this online. I was wondering if anybody knew any good fixes for this.
robloxapp-20220304-1931578.wmv (2.2 MB)
spawn(function()
while wait() do
if WalkingThreadOveride then
entity.Humanoid:MoveTo(WalkingThreadOveride.CFrame.Position)
end
end
end)
Thanks for taking the time to read through this!