Im currently having a issue with my Gui script that translates the scale into offset
At the moment no matter what it just makes it {0,0} {0,0}
The ViewportSize is the available space on the players screen.
There are no error messages.
I’m using scale and have a frame that covers 0.25 of my screen on the x axis so if my resolution is 1366 x 768 it should be 341.5 when translated.
Im not really sure about whats up with it other than the fact the Udim2 always comes out as 0s
function GetTranslated(Udim2)
local ViewportSize = GetCurrentCam().ViewportSize
local NewX = Udim2.X.Scale * ViewportSize.X
local NewY = Udim2.Y.Scale * ViewportSize.Y
print(Udim2.X.Scale)
local NewPosition = UDim2.new(0,Udim2.X.Scale,0,Udim2.Y.Scale)
print(NewPosition)
return NewPosition
end