I have a waypoint system and each waypoint has a number as its name, but when I run the script, they just walk to whatever waypoint they want to instead of the correct order
well what you sent specifically wasn’t correct because of the waypoints variable, but that’s how i fixed in case anyone has the same issue:
local waypoints = workspace.Waypoints
for i,v in ipairs(waypoints:GetChildren()) do
humanoid:MoveTo(waypoints[tostring(i)].Position)
humanoid.MoveToFinished:Wait()
end