How do I change the size of a UI(With aspect ratio constraints) using a script?

It works when I try to manually move and drag the gui in studio, But it doesn’t work if I try to change it with a script. Does anyone know how to do this?

1 Like