i am creating a game and for inventory im using viewport frames so every item has a camera in it that the viewport frame uses to generate an image of the item, but when i press play the camera just disappears here is a picture
before play:
and in play:
any suggestions how could i fix that
its just a template so i cant connect it because for some tools the camera will be different
or do i have to set one camera for every item?
You can remove the axe from the ViewportFrame and put something else in it when you don’t need it there.
yeah thats what the script it doing wait let me send you a screenshot
edit: i mean the inventory script
Is the camera set to the correct position?
yeah it is i have checked already here is a screenshot of the item frame template in edit mode
this is how its supposed to look like, may change later but that doesnt matter since the image is not even working
I had this problem a really long time ago. If I recall correctly the way you’re going about this doesn’t work. The camera will always disappear in play mode and there is no way around it.
What you can do is write a script that creates a new camera and sets the camera position and the Viewport.CurrentCamera to the new camera. The camera
has a CFrame property so maybe you could just get the CFrame of the camera
you already have and use that in the new camera
yeah i guess that fixes the issue