I was working on a game earlier today and realized something when I went to test it on mobile, even though a image I had in studio looked square when I had the udim using the scale values instead of using the offset values, it came out looking very warped on my phone. I already knew that this happens but had never run into it before because most of my gui's just used the full screen anyways. Is there any way that I could make it so that the Udim2's offset values automatically change when the screen size changes?
This is all I have so far:
script.Parent.Size = UDim2.new(0,?,0,?)
script.Parent.Parent.Changed:connect(function(property)
if property == "AbsoluteSize" then
script.Parent.Size = UDim2.new(0,?,0,?)
end
end)

3 comments
if you want an image to be square, why not use SizeConstraints and scale?
use Scale values.
thanks disillusions