I am trying to make a VPF portal for my game, but I also want to understand how it works. Whenever I look up how to do it, it is always telling me to get a free model. Any help on how to make this from scratch?
what is a vpf portal and then maybe i can help you
A viewport frame portal. Basically you can see to the other end.
You would put a ViewPortFrame
under a ScreenGUI
under StarterGUI
and set the ScreenGUI’s
Adornee
to the portal, set everything else and you should be good
(And add the script to teleport
I don’t think ScreenGUI has an adornee option
It does have one, I already created this and that’s the only (current) way of doing it
Okay, I will tell you all the steps:
Create a ScreenGUI
under StarterGUI
Set the ScreenGUI
’s Adornee
to the portal
Resize the ScreenGUI
Put a ViewPortFrame
under the ScreenGUI
Create a Camera
, and put it on the opposite portal on which you’re working (if you’re doing this for the left one, the Camera
would be on the right one)
Change the properties of the Camera
to display everything you need
Now, you can either:
- Put a
WorldModel
under theViewPortFrame
or - Clone everything that has to be displayed under the
ViewPortFrame
And now you should be done
Do you mean SurfaceGui? I checked and ScreenGui has no adornee.
Oh yes, SurfaceGUI
, sorry
I feel dumb now
To create something like this from scratch it takes a lot of advanced scripting. You’ll want a SurfaceGui
that has an adornee on a wall or part with a viewport
under it. You can view the entirety of how to make something like this in this video. It tells you how it would all be done but not specifically how to create it in Roblox Studio, henceforth the advanced scripting that’s needed.
Edit: Assuming you want like a realistic one like I’m imagining.
Last time I tried I got the exact thing I needed (having a part display another part of the world) without any scripting needed, what I said is how I did it, for mine how realistic it is has to do with how realistic the shown part actually is
*Scripting if you would want to re-create the effect as though you were looking through a window or doorway I meant.
Oh, like when you are looking at hot air?
Yea that would require scripting, and a lot
(Or some kind of unexistijg effect)