Hello Robloxians! I am making an FE2 fangame, and I need a “Goal Locator” for it like FE2.
e.g.
How can I do this without the line being obstructed?
Use the beam instance to do this.
I tried that, but it gets obstructed by walls.
What do you mean obstructed? Also, use highlights if you want the player to see the object through walls.
This might be a bit over complicated, but you might be able to use some screen math to draw a line on the screen from pointA to pointB. Consider Camera:WorldToScreenPoint()
How would I do this? I have no idea what this means.
Okay, all you need to do is raycast the line and get all the instances it touches, and make them invisible. You will also need to make that instance that is invisible excluded from the raycast.
I see where you are going, but I need to keep all walls visible for the game.
You can make the walls invisible on the client.
Same thing, I need to keep all walls visible.
Then you can’t do this? Did you want the line to curve around the walls?
Basically, that function I provided returns point on the screen, when you give it a position in the world.
It’s a bit obscure, but you could setup a GUI that connects between those two screen points. If one of the screen points aren’t on the screen, just use math.clamp()
.
No, I need the line to be straight.
Can you provide a script please?
I’m confused then. How do you want the line to work? The screenshot you posted of how you wanted it to work shows no wall. If there is a wall, you have to make it invisible. If you don’t want that, just make the line curved.
There was a wall, it was just blended in.
Here is a better image
Im not sure what is happening here. Is it on the ground or on the wall?
The button is behind the wall. And the line is going through the wall.