I tried to make a viewport frame on a surface gui on a part. On the explorer, It look like this:
I also made a regular script to create the camera and position it (The script called “Camera” in the explorer)
In this script, I put this code:
local viewportFrame = script.Parent.ViewportFrame
local viewportCamera = Instance.new("Camera")
viewportFrame.CurrentCamera = viewportCamera
viewportCamera.Parent = viewportFrame
viewportCamera.CFrame = CFrame.new(viewportFrame["12StudJump"].CameraZone.Position, viewportFrame["12StudJump"].CameraTarget.Position)
I need help because the script don’t work:
The transparency of the part “cameraTarget” is 0 and “cameraTarget” must be visible on the viewport frame but the viewport frame stay empry when I launch the game.