Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

ViewportFrame displaying a blank image?

local Camera = Instance.new("Camera")
Camera.Parent = script.Parent
Camera.Name = "CustomizationViewport"
Camera.CFrame = CFrame.new(Vector3.new(0,5,0),script.Parent.CameraPart.Position)

script.Parent.CurrentCamera = Camera

This is a local script, the part I want to focus on is apart of the ViewportFrame, and the Script's parent is also the ViewportFrame.

It always just turns up as a blank white image, how can this be fixed?

2 comments

0

check to see if the model is anchored, make sure the model is small, OH AND ALSO, you are going 5 studs up, instead of Vector3.new(0,5,0) try Vector3.new(0,0,5)

0

It is anchored, the Viewport is just blank still.

2 answers

The first thing to consider is how far away if your camera. Doing Vector3.new(0, 5, 0) will put your camera at (0, 5, 0), that is correct, however what is the position of the CameraPart.

If your CameraPart's position is something insane like (200, 200, 200) and you do that, you won't be able to see it because it just falls off the frame. Similarly to a real roblox camera, very far things disappear off your view or become hard to see. To fix this, either check your vector3 value in comparison to your CameraPart's position, or program it to offset it.

The second thing to do is if you want to completely eliminate this background, try doing script.Parent.BackgroundTransparency = 1, or something similar to that. This might help out in solving your problem.

1 comment

0

I did all three of your recommendations, it's still just a blank Gui.

Solved it on my own, I had a script that moved the focus part into the workspace.

This discussion is preserved as it was. New answers, comments, and votes are closed.