How to make like waypoint / direction in Roblox [ASK]

How to make a waypoint or like in many simulator games where it shows the direction to a place or to an npc? I don’t know I think it’s using part. So when we move the direction also moves. I think like objective markers.

Do you mean like a part above your head pointing in the direction you should be going or do you mean like a beacon in the distance?

I guess you mean a path created by pathfindingservice right? Something like this:

image

Well I think this is good idea and maybe using Beam to make it more interacting?

Use this as example:

local PathfindingService = game:GetService("PathfindingService")
local Part = workspace.Part
local Target = workspace.Target

repeat wait(1)
	local path = PathfindingService:CreatePath()
	path:ComputeAsync(Part.Position, Target.Position)
	local waypoints = path:GetWaypoints()
	for i, waypoint in pairs(waypoints) do
		local part = Instance.new("Part")
		part.Name = "path"
		part.Shape = "Ball"
		part.Material = "Neon"
		part.Size = Vector3.new(0.6, 0.6, 0.6)
		part.Position = waypoint.Position + Vector3.new(0, 2, 0)
		part.Anchored = true
		part.CanCollide = false
		part.Parent = game.Workspace
		coroutine.wrap(function()
			wait(1)
			part:Destroy()
		end)()
	end
until (Part.Position - Target.Position).Magnitude <= 1