How is this "Follow the arrows" system made?

I’ve seen them in many games as a form of arrows that indicate you in what direction you should go (used for tutorials most of the time) making it very intuitive for the player.
I would like to know what tools I need to use in order to achieve this.
I believe it might be something simple I just don’t know how to do it.

Example:

Thank you!

15 Likes

How To Create The Effect

One way this is commonly done is using a beam; One attachment is the player, the other is destination that they should go to.

https://gyazo.com/8ac2b0104c6880516a396ab037dafe4a

Scripting

The first thing you need to do is make a local script with a beam to use as the template. For example:
image

Secondly, make a part for the destination goal. Add a attachment to it.
image
Now, to create a beam between the player and destination, simply set the attachments:

Local Script:

local plr = game.Players.LocalPlayer --Current Player
local beam = script:WaitForChild("Beam"):Clone() --Create a clone of our template

local function pathToPart(beam, a0, part) --Function to make making paths easier
	local a1 = part:FindFirstChildOfClass("Attachment")--Find the attachment in the part
	if a1 then --If we found one, attach it
		beam.Attachment0 = a0 --Set attachments
		beam.Attachment1 = a1
	else --If there isn't one, let the scripter know
		warn("No attachment was inserted into "..part:GetFullName())
	end
end

plr.CharacterAdded:Connect(function(char)--Every time player respawns, connect beam again
	local root = char:WaitForChild("HumanoidRootPart") --Get humanoid root part
	local a0 = root:WaitForChild("RootRigAttachment") --Wait for root rig attachment
	pathToPart(beam, a0, workspace:WaitForChild("Part")) --Set attachments
	beam.Parent = char --Parent the beam to the new character
end)

Note that a ton of the properties of the beam can be changed to make the arrows look better or different.

Downloadable Demo

In case you didn’t want to read the above or felt like checking to see it works properly, click on the link below.
FollowBeamDemo.rbxl (16.4 KB)

73 Likes

Beautiful answer, thank you so much!

8 Likes

No problem, I like to give detailed responses to help people out. Glad you found it useful. If you have any more questions, feel free to continue the thread here or message me.

12 Likes