How i detect align position ended

i searched but i didnt found any the resutl.
what i do? align position is ended

if you know please help

Use loops to constantly detect if the position of one attachment is near the end goal.

i use a lot of parts like for example a to b b to c and i used for i=1, bla bla type

What are you using this for? Is it possible you can use bodypositions instead because of its ReachedTarget event?

local Part = script.Parent

local goal = Vector3.new(0, 0, 0)

while task.wait() do 
	if (Part.Position-goal).Magnitude < 0.01 then 
		print("ended")
		break 
	end
end
1 Like

i making tower defense game but i used humanoid:Move but sliding (if faster) and i used this method but because the alignment position is not finished moving to 2nd attachment

Using align position and any other non-static physics is not a good idea. Most tower defense games use anchored characters moving them by lerping.

i dont know lerp :skull: do u teach me?

Found some code which might help in this pathfinding tutorial.

humanoid.MoveToFinished:Connect(function(reached)

Example:

--previous code
humanoid.MoveToFinished:Wait() -- Waits until fired
--next code after MoveToFinished fired.

Linear interpolation. It’s way better moving the character by it as you can just put it on it’s expected position based on it’s runtime. Basically read the posts made on it.

cool module!