Hey guys, I was wondering if there was a way to set an object/model parented to the camera to be shown in front of ScreenGuis? I have an animated NPC I want to show within a GUI, but its playing hide and seek behind the Gui…
Are you talking about viewport frames?
no. I have an NPC thats cloned to the camera. I have its position set to a frame on a gui. but it sits behind all the guis. I was just wondering if there was a way to make it sit on top of them instead of behind them
As the previous reply alluded to, make a ViewportFrame with the NPC, and have a GUI element with a higher ZIndex move in front of it.
It’s less expensive to have a ViewportFrame do this I feel, is there any specific reason you need it on the Camera?
Not really, I was just playing around and trying different things. I was just curious if there was a way to set an object that was parented to the camera to sit in front of Guis instead of hiding behind them…
As far as I know GUIs always render over anything on the Camera, so your best bet would be to use a ViewportFrame. Easier and more performant if you are frequently moving the NPC.
Ok,Thank you for responding! I am still new to this, so I will probably ask a bunch of random questions LOL. I will start reading up on ViewportFrames
Enjoy! They’re one of my favourite things to work with. Fun fact: moving the camera in a ViewportFrame is faster than moving the object inside of it!
I know nothing about ViewportFrames. So it is going to take me a bit LOL
I will keep that fun fact in mind when I do tho Thanks!
@CoolJackoWacko So, I kept everything the same as before, but cloned the npc to the workspace, and it is still hidden, but I have it playing the animation a viewport frame. Thanks again!