local PathfindingService = game:GetService("PathfindingService")
local Workspace = game:GetService("Workspace")
local Rig = Workspace:WaitForChild("Rig")
local Humanoid = Rig:WaitForChild("Humanoid")
local GoalPart = Workspace:WaitForChild("Goal")
local Path = PathfindingService:CreatePath()
local Success, Error = pcall(function()
Path:ComputeAsync(Rig.PrimaryPart.Position, GoalPart.Position)
end)
if Success then
for _, Waypoint in pairs(Path:GetWaypoints()) do
Humanoid:MoveTo(Waypoint.Position)
Humanoid.MoveToFinished:Wait()
end
else
warn(Error)
end
** You are now Level 2! **