You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
So i recently watched a tutorial about TDS and made a game about it. Well basically everything else is good but only the Mobs have a problem when moving: De-Jure
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Magnitude check (still figuring it out)
Delaying movement time (failed)
Searched on the devHub (failed)
Extra checks (failed)
Rewatched the whole episode to figure out what I missed (failed, same code no problems)
Asked friend (busy or can’t find the solution)
function mobHandler.move(mob: Model, map: Folder)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.waypoints
local reached = false
local testHUM = Instance.new("Humanoid")
for waypoint=1, #waypoints:GetChildren() do
humanoid:MoveTo(waypoints[waypoint].Position, waypoints[waypoint])
humanoid.MoveToFinished:Wait()
-- problem starts with these 2 lines↗
print(waypoints[waypoint])
end
debris:AddItem(mob, .1)
updateHealth:Fire(humanoid.Health)
end
I heard humanoid movement systems have janky ahh movements and are very unreliable so I don’t mind if rewriting back the whole thing is the best option
for waypoint=1, #waypoints:GetChildren() do
repeat
humanoid:MoveTo(waypoints[waypoint].Position, waypoints[waypoint])
humanoid.MoveToFinished:Wait()
until (mob.PrimaryPart.Position - waypoints[waypoint].Position).Magnitude <= 1 -- u maybe need change 1 to smaller or bigger depend on enemy size
print(waypoints[waypoint])
end