UDim2.new(0, 0, Frame.Size.Y)

When i try tween one axis i need to make sure that the other axis stays the same so in my tween goal I put:

goal.Size = UDim2.new(0, 0, timeFrame.Size.Y)

but when trying it out it doest work, because it just dissapears to both axis instead of the x only

1 Like

Udim2 is a two dimensional value, you probably need to use vector3.

goal.Size = Vector3.new(0, timeFrame.Size.Y, 0)

But it’s a gui the thing I use

1 Like

Are you okay? You don’t seem to be okay. Why did you suggest using vector 3 on a property that ONLY accepts udim2?

As for the OP:
Can you provide video footage? It helps us better understand the issue.

They never said they were tweening a gui… I assumed it was a vector3 because they tried to use 3 values instead of 4 sorry for my mistake I guess?

It doesn’t matter how many parameters they are using, it is seen that OP is using “UDim2” so it should be assumed that they are doing it for a GUI. The usage of 3 values is also possible as timeFrame.Size.Y is a UDim value and UDim2 does accept them as well.

No, but you are kind of spreading misinformation. It’s fine though.

However, I think I have identified the issue here which is them using the UDim value.

Here is the fixed code:

goal.Size = UDim2.new(UDim.new(0,0), timeFrame.Size.Y)

Not that kind of image but leave it.

Do this:

goal.Size = UDim2.new(UDim.new(0,0), timeFrame.Size.Y)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.