How To Make This Effect? Certain Instance Only Visible Inside a Frame

I was inspired by a effect in a game called Army Of Two 40th. The effect is a GPS that shows you a frame and inside that frame there is a green trail with arrows and a direction of where you should go and how the colors of the game change inside that frame.

Example With Frame On:

Without Frame:

I was wondering how would one be able to recreate this in Roblox, specifically making the green trail visible only in that frame and not beyond that frame.

I know that you can put a part with surfacegui and renderstep it infront of the players camera but I wanna know how you could make certain instances visible when with in that frame.

You could probably use a viewportframe with a viewport model inside of it and put pathfinding node/part(s) inside of it

Wouldnt that be rescource heavy?

It is one of the simplest ways you could add that system into roblox studio you can also use the clearallchildren() function every second and regenerate so it won’t lag the player if you must

How would that stop lag I would think it would add a lot more lag to regenerate every second.

That’s a method of optimizing instead of just regenerating it instantly, tho you can also come up with more ideas

It would only add lag unless you actually determined what to draw but I doubt you could get any gains from it.

1 Like