Scale Model like SurfaceGui

I’m messing around with displaying surfaceguis like screenguis, but I ran into an issue when trying to show more than 1 part in the player’s camera.

Right now what I have can put 1 part in the camera, and size it to the point where a surfacegui can render perfectly on the part:


Now, the issue I’m running into starts when trying to use multiple parts and render them relative to the player’s camera as if it was a screengui, for example:

I have not been able to find an effective way to scale the child part(s) with the main background properly. This is what I’m aiming for:

Any guidance would be appreciated

Code so far:

local offset = 5
local part = workspace.UITemplates.Model.Part
game:GetService("RunService").RenderStepped:Connect(function()
	local ViewSizeX = ScreenSpace.ViewSizeX()
	local ViewSizeY = ScreenSpace.ViewSizeY()
	part.Position = workspace.CurrentCamera.CFrame * CFrame.new(0, 0, -offset - 0.5)
	part.Size = Vector3.new(ScreenSpace.ScreenWidthToWorldWidth(ViewSizeX, -offset), ScreenSpace.ScreenHeightToWorldHeight(ViewSizeY, -offset), 1)
end)

To make my desired outcome more clear, I pretty much need a way to resize this model programmatically as if I was scaling a frame with a bunch of child UI elements in it - so not keeping the same aspect ratio. The parts need to be able to stretch/shrink based on the size of the viewport.

Read all this it can help UI Animations

Thanks, but not sure that can really help with what I’m trying to accomplish. I need a way to scale the model and its children to different screen sizes and display them in front of the player’s screen