Hello!
I tried simplifying this script as simple as posible for me but still ran into this problem.
I tried to convert the Y size of my textlabel from Scale to offset.
The part were I converted the number works, but I can’t seem to figure out why the Y Offset size of the image does change but it becomes {1,0},{0,0}
local image = script.Parent
local function scaleToOffset(scale)
local viewPortSize = workspace.Camera.ViewportSize
print(scale)
print(image.Size.Height.Offset)
print(viewPortSize.Y)
print(scale / viewPortSize.Y)
return {scale / viewPortSize.Y}
end
local Y = scaleToOffset(image.Size.Height.Offset)
print(Y)
image.Size = UDim2.new(1,0,Y,0)
this is the output I’m getting for every print statement:
print(scale) = 200
print(image.Size.Height.Offset) = 200
print(viewPortSize.Y) = 356
print(scale / viewPortSize.Y) =)0.5617977528089888
print(Y) = 0.5617977528089888
Now when I convert the image with the plugin AutoScale Lite, it does give the same answer as what the statements print (0.562).
Could someone maybe help me?
Now thank you for reading this and I hope you have a wonderfull day!