How to use viewportframe

I don’t use modules, sorry. I don’t think what I’m doing requires more than 10 lines of code and I want to just code it instead of over complicating things with unnecescary scripts and potential backdoors. I also looked at the preview and its spinning the objects in the viewportframe while also have some complex
“scale” option. I don’t need extra code I just want to make the object go in my viewportframe. I don’t need any auto adjusting, rotating objects.

You’re supposed to put a World Model into the Viewport Frame and put your parts in there. Or maybe the camera’s CFrame is wrong (That’s what I’m seeing, but I think it’s the World Model).

Can you show me the children of the Viewport Frame?

please look at my previous replies which I supplied images which show information pertaining to how I have things sset up

1 Like

image
I tried and it still doesnt work
image

local clone = data.Template:Clone()
clone.Parent = data

local object = game.ReplicatedStorage.Info[v.Name][A.Name].Lv1:Clone()
object.Parent = clone.ViewportFrame
					
local camera = Instance.new("Camera")
camera.Parent = clone
					
clone.ViewportFrame.CurrentCamera = camera
camera.Focus.Position = object:GetPivot().Position + Vector3.new(object:GetPivot().Position * 2, 0, 0)

You gotta put your model in the World Model. Everything you see in the viewport goes in the World Model. + I would put the camera inside the Viewport Frame just in case.

image

image

Is the Viewport Frame big enough?

Link to relevant post:

dude we arent talking about zooming to models we are talking about the fact that nothing is popping up even though we are setting the camera CFrame to the modele

well actually it did work however its not looking good
image

I want it to be centered and also to be more in frame

image

Try increasing or decreasing the FieldOfView or the fovDivisor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.