Hey.
I’m trying to stop the MoveTo() if the while cycle has ended before the dummy has arrived to the destination.
The script is the following:
Dummy.Humanoid:MoveTo(Vector3.new(
Finish:GetPivot().X,
Finish:GetPivot().Y,
Finish:GetPivot().Z
))
while Temp >= 0 do
Temp = Temp - Calc
if Temp < 0 then
Temp = 0
State:SetAttribute("Energy", Temp)
else
Temp = Temp - Calc
State:SetAttribute("Energy", Temp)
end
wait(1)
end
--Stop it here
I’ve tried searching around but i found nothing.
I’ve tried making the dummy move to another position, but it doesn’t work.