-
What do you want to achieve? Keep it simple and clear!
So i was making an yacht which swims from 1st waypoint to last one and then do that again -
What is the issue? Include screenshots / videos if possible!
For some reason nothing just works. Every parts are welded and not anchored.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
My code:
local PathFindingService = game:GetService("PathfindingService")
local function Move()
local Humanoid = script.Parent.Body:WaitForChild("Humanoid")
local Waypoints = workspace.YachtWaypoints
for waypoint = 1, #Waypoints:GetChildren() do
Humanoid:MoveTo(Waypoints[waypoint].Position)
Humanoid.MoveToFinished:Connect(function()
waypoint = 1
end)
end
end