I am making a gui where the size of the frame changes as the size of the block changes. How would I get the size of a block, and only the x and z?
frame= Instance.new('Frame') frame = script.Parent.Size.X * 2 frame = script.Parent.Size.Z * 2
please help!!! Thank you!!!
[EDIT] I realized that ******.X or Z isn't possible, is there a way to just get the first number and the third number?
Frames use something called a UDim2, not Vector3. When you want to find the x value, say frame.Size.X
. This returns a UDim, which has a scale and offset property. If you're using the scale (the first number, goes from 0.1 to 1), say frame.Size.X.Scale
, for offset frame.Size.X.Offset
. You can also do the same thing for the Y axis.
If you're looking to resize your frame (kind of like using BodyPosition), check out:
http://wiki.roblox.com/index.php?title=Tweening
How to use UDim2's to manipulate size:
http://wiki.roblox.com/index.php?title=UDim2
There's n arrow next to 'Size' in the properties of the brick, click that and it. will give you the X, Y, Z cords.