3D UI Viewmodel positioning issue

i want to achieve 3D Ui with viewmodel that sways slightly, i started on working on positioning the parts so they dont go off screen when screen size changes,

issue is, when moving one part, it moves correctly no issue, but when moving another part thats slightly taller in size else its same its shifting weirdly

welding them together, didnt work at all

the issue is with the hotbar

local function adjustToVS()
	print("adjustingVS")
	local screenWidthStuds = getViewportWidthInStuds()
	local ar = vm:WaitForChild("ar")
	ar.Size = Vector3.new(screenWidthStuds, 0.01, 0.01)

	local halfWidth = ar.Size.X / 2
	local off = -0.2

	local centerPos = ar.Position

	local leftCornerWorld = centerPos - ar.CFrame.RightVector * (halfWidth + off)
	local rightCornerWorld = centerPos + ar.CFrame.RightVector * (halfWidth + off)

	leftCornerWorld = Vector3.new(leftCornerWorld.X, centerPos.Y, leftCornerWorld.Z)
	rightCornerWorld = Vector3.new(rightCornerWorld.X, centerPos.Y, rightCornerWorld.Z)

	local status = vm:WaitForChild("Status")
	status.Position = Vector3.new(leftCornerWorld.X, status.Position.Y, leftCornerWorld.Z)
	
	local hotbar = vm:WaitForChild("HotBar")
	hotbar.Position = Vector3.new(leftCornerWorld.X, hotbar.Position.Y, leftCornerWorld.Z)

	local noti = vm:WaitForChild("Notifs")
	noti.Position = Vector3.new(rightCornerWorld.X, noti.Position.Y, rightCornerWorld.Z)

	--findRel()
end



(the taller part above shorter part is the hotbar)

the hotbar part moves a bit more than the status part (short one) and is weirdly offset

any help appreciated

Consider caching variables
Maybe you want to move them using CFrames?
It looks like you set their position no metter where player is looking.

ALSO

Position works very weirdly with Welds and bypasses assembly of parts.
That could be the reason

you’re right, doing it with CFrames was the better way but after a while it got really messy, ended up setting the viewmodel to 0,0,0 and rotation also to 0 so i can adjust it easily and then just move it back adjusted