Hey, I need a little help with cameras with viewport frames

Hey, I don’t know if this is a bug, but whenever I generate a camera, and parent it or set current camera to it, it doesn’t register, I’ve been trying to fix this for an hour and it doesn’t work, is there a solution with this?

local VPF = Templt.Button.VPF
		game.ReplicatedStorage.BoatTemplateInfo.BoatMODELS:FindFirstChild(BoatName):Clone().Parent = VPF.Model
		local modelCF, modelSize = VPF.Model:GetBoundingBox()
		local camera = Instance.new("Camera")
		camera.FieldOfView = 30
		camera.Parent = VPF
		VPF.CurrentCamera = camera
		camera.CFrame = modelCF * CFrame.new(-10,0,0) * CFrame.fromEulerAngles(math.rad(0),math.rad(-90), math.rad(0))


Its weird, because it exists, and I checked with this sanity check, however, the VPF doesn’t want to register it for some reason