local function g(g)local N={}for f,j in ipairs(g)do local P=visualWaypoint:Clone()P.Position=j.Position P.Parent=workspace P.Color=j==g[#g]and Color3.fromRGB(0,255,0)or j.Action==Enum.PathWaypointAction.Jump and Color3.fromRGB(255,0,0)or Color3.fromRGB(255,139,0)table.insert(N,P)end return N end
--Create visual waypoints
local function createVisualWaypoints(waypoints)
	local visualWaypoints = {}
	for _, waypoint in ipairs(waypoints) do
		local visualWaypointClone = visualWaypoint:Clone()
		visualWaypointClone.Position = waypoint.Position
		visualWaypointClone.Parent = workspace
		visualWaypointClone.Color = (waypoint == waypoints[#waypoints] and Color3.fromRGB(0, 255, 0))
			or (waypoint.Action == Enum.PathWaypointAction.Jump and Color3.fromRGB(255, 0, 0))
			or Color3.fromRGB(255, 139, 0)
		table.insert(visualWaypoints, visualWaypointClone)
	end
	return visualWaypoints
end
