How to make an objective locator?

Hello Robloxians! I want to make a locator similar to FE2. If you are unsure of what I mean, here is a photo:
Screenshot 2024-01-22 155855

As you can see, a beam will just clip through the floor, but the line here does not.
How could I make something like this?

1 Like

For this sort of thing I usually use surface GUIs.

First, I’d create a beam going to wherever I wanted and put a surface gui on all of it’s sides.


Fill the surface guis with a frame that you can design how you’d like.

And finally, turn on the “AlwaysOnTop” property of the surface guis.

And Ta-Da! You can see the beam even behind a wall.


If you can’t tell, the part is actually going through the house. Hope this helps!

Hello! I will try this, thank you!

1 Like

How I did it when I was making a fe2 fan game was creating 3 parts. 1 part for the line, and 2 parts for the ball.


Make sure its in a model then put in a viewport frame with the parts then make a script to set the CurrentCamera of the viewport script to the CurrentCamera
for the Part1 location set it to the HumanoidRootPart (if you want to make it farther maybe minus it by 2, 0, 0 or smt idk), set Part2 to the button hitbox for the line use local Dis = (Part1.Position - Part2.Position).Magnitude) then set the size with Vector3.new(0.2, 0.2, Dis) then set the CFrame to CFrame.new(Part1.Position, Part2.Position) * CFrame.new(0, 0, -Dis/2). Oh yeah make sure you set the color to the button!

1 Like

Oh wow! It works perfectly! From one FE2 fangame dev to another, this is fantastic! Thank you for taking the time to help me!

Wait, I have a problem, it only seems to work correctly in first person.

Also this odd thing happens.

It would probably be a pain to get a 3d part to line up with the UI for varying screen sizes.

One option might be using this resource:

But then mod/hack the UI so it creates lines and the dot from a piece of UI to the UI markers.

I have no idea how to do that.

Nevermind, changing the FOV of the camera worked, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.