For some reason, I get a error upon trying to change a size of a frame with a script. Neither of these work: UDim2 and UDim. So how can I change a size of a frame using a script if UDim/UDim2 won't work? Is it meant for position. Is there a UDim2/UDim meant specifically for the size property? Help? This is the code I'm using:
1 | -- This code doesn't work -- |
2 | game.StarterGui.ScreenGui.Frame.Size = UDim 2 ( 1 , 0 , 1 , 0 ) |
3 | -- Neither does this work -- |
4 | game.StarterGui.ScreenGui.Frame.Size = UDim( 1 , 0 , 1 , 0 ) |
Size is a UDim2 value and you are creating a new UDim2 value so you'd use UDim2.new()
1 | game.StarterGui.ScreenGui.Frame.Size = UDim 2. new( 1 , 0 , 1 , 0 ) |
2 | game.StarterGui.ScreenGui.Frame.Size = UDim 2. new( 1 , 0 , 1 , 0 ) |