Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

UDim2 Scale.. is this not what i think it means?

number is ()'s does the {(0), 0} {(0), 0} mean it's scaled to the player screen or not?

what I'm trying to do is make a Gui on the side of the screen, with just the Arrow visible(to open it)

the arrow is different from another person's screen.

how do i make it so it's the same on all screen?

i tried both offset and scale in size and position. it was always different for the other person.

i have it to tween when it's clicked. but i have it set in the properties while I'm testing. I can't figure this out... or even know if it's possible what I'm trying to do.

anybody that helps, thanks.

sorry for no code.. but it's more of a property, not a script. i think

5 comments

0

As long as it's position and size both is set with scales, it will be scaled for player's screen. If it's not, please send some screenshots.

0

Ok i will when i get back home

0

If you want the sizes to be the same on all screens, use OffSet. If you want the sizes to be scaled in correlation to the size of the screen, use Scale. UDim2.new(xScale, xOffset, yScale, yOffset)

0

Scale is proportions by a percentage, Offset is a pixel.

0

one says Offset... another says Scale... Offset doesnt work anyways... the other person couldnt see it.

1 answer

Scale is a number between 0 and 1, representing the proportion of the object's parent to use in its Size/Position calculation. If the parent is the ScreenGui, then the player's window size is used.

For example, say you have this hierarchy:

PlayerGui
	ScreenGui
		Frame
			ImageLabel

and the Frame has a Size of UDim2.new(1, 0, 0.5, 0). This means that its X size will be the full width of the player's window, and its Y size will be half the player's window's height.

Now say the ImageLabel has a Size of UDim2.new(0.1, 100, 0.1, 100). This means that it will have a size of 10% of the Frame's size plus 100 pixels.

Position works the same way.

If you want something to appear exactly the same on multiple screens, you'll want to use only Scale, not any Offset.

This discussion is preserved as it was. New answers, comments, and votes are closed.