![]() WConnection = humanoid.MoveToFinished:connect(function() -Honestly, I don't even know what this does. If waypoint.Action = then -If jumping is required, make the NPC jump. Humanoid:MoveTo(waypoint.Position) -Moves NPC The old code functions better, but it freezes at the Humanoid.MoveToFinished:Wait() line, making it unusable as well. Instead of the NPC switching smoothly between AI navigations and simple Humanoid:MoveTo(player), the NPC no longer uses AI navigation, although it is running the code, and it is much buggier than before. I’m not sure if I’ve implemented this wrong, but this seems to break the entire navigation system. ![]() Does anyone know why this is happening?Įdit: I managed to get it working, if you’re looking for a more detailed solution (with code) check post #8. Additionally, the Developer Hub didn’t seem to have any useful information. I’ve tried looking online and I found a few related issues, but none had an answer and many were quite old. The NPC stops moving, but the event isn't fired. Humanoid.MoveToFinished:Wait() -This code is getting stuck here. Path:ComputeAsync(position, targetPosition) -Create pathįor i, waypoint in pairs(waypoints) do -This loop makes the monster follow the waypoints to the player it is chasing. Local targetPosition = char:WaitForChild("HumanoidRootPart").Position or char:WaitForChild("Torso").Position Local player = PlayerService:GetPlayerFromCharacter(char) While not visible in the video, the NPC had already used PathfindingService with no issue to get to the player, but when used again, it started to bug out. ![]() At that time, it switches from raycasting and :MoveTo() to PathfindingService. In the video, the NPC functions–normalish–until the player moves around the corner. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |