How to make viewportframe accurate?

when i zoom out the camera the part in inaccurate like in the gif

local player = game.Players.LocalPlayer
script.Parent.ViewportFrame.CurrentCamera = game.Workspace.CurrentCamera
	script.Parent.ViewportFrame.Ball.Position = player.Character.Torso.Position

thats the script
how do i suppouse to fix it?

It updates every renderstep. Thats why when you zoom out/in it changes the position. If you remove that and wait for the player to join/character to load, then it will always be the same.

This is because you made a rectangle viewportframe instead of square viewportframe. There is nothing wrong with the script just make the viewport frame square and it will be ok. The camera screen is originally a square, once you make it into a rectangle. This works like inserting a square image into a rectangle part surface. And that why the point is not on the position where it supposed to be.

so how do i make the viewportframe into a square?

even when i shiftlock it changes postions how can i adjust the viewport to make it always the right size and position

Forgot about what I said, I have found that the real problem is that your viewportframe isn’t really coved the whole screen. I think you didn’t cover over the top bar. Try set viewport frame’s Position into (0,0,0,-36) and Size into (1,0,1,36).

1 Like