I’m trying to change the “SizeConstraint” property of a frame from relativeXX to relativeYY using a local script during runtime. Using the command bar or the properties to change it works fine, but for some reason editing it in a script doesn’t actually change it.
This is all that is in my local script:
print(“Script Running”)
game:GetService(“StarterGui”):WaitForChild(“ScreenGui”).Frame.SizeConstraint = Enum.SizeConstraint.RelativeYY
The frame’s size constraint stays as RelativeXX.
FYI I’m using this in my GUI resizer to handle cases where the window’s aspect ratio changes so that the X to Y ratio exceeds 16:9 (Like a widescreen monitor). I could manually edit the size values every time the screen size changes, but it would be cleaner if I could just set the size constraints instead.
Help would be appreciated.