ViewportFrame issues

I’ve run into a problem with the camera inside my ViewportFrame, I’m adjusting it like so:

local camera = Instance.new("Camera", hotbarSlot)

camera.CFrame = CFrame.new(Vector3.new(2, 2, -4), hotbarSlot.Item.Position)

A couple of fixes I’ve tried:

-Setting the item’s position to 0, 0, 0
-Adjusting the camera’s position

A couple of things that I know I have:
-The camera set to the Scriptable camera type
-The item exists
-The camera exists, and the CFrame is in the correct spot
-The item is not transparent

I’m all out of solutions, help is appreciated!

What is the item’s position? Maybe, it’s facing in different direction. Or wrong position

The current item position is 0, 0, 0. Does the position need to be changed?

Does the item is in the viewport frame?

Yep. I made sure that was the case.

You must set the Current Camera of the viewport to the camera, also this must be done client sided.

2 Likes

I forgot to set CurrentCamera. I feel so embrassed on how much time I spent on this. Thanks.

1 Like