Why won't my TextButton tween the size of an ImageLabel when i click it?

Hey guys, trying to tween the size of an image label when you click on a textbutton. Though when i click it, nothing happens.
here is my script:

here is some other stuff:
image

2 Likes

Any errors? Please list them if you do have any

1 Like

Is there any errors shown in the output?

1 Like

All looks good, but maybe switch out "Linear" for Enum.EasingStyle.Linear. The same should be done with "In" if it applies. If that doesn’t work, then I’m not sure.

1 Like

not a single error. Not sure why, though.

1 Like

Nope, no errors. I do not know why.

@Gusshiy @EliteSniperBoss123

image
this started appearing? sometimes when i try something new with the code this error appears. here is the highlighted “value” error:
image

1 Like

I don’t remember what I did when I was doing my tween positioning for my GUIs, but if you’re doing GUIs it’s simple, the reason I don’t remember is because my game recently got hacked in July, so I can’t access the code. I think you will for x={start},{end},{increment} do, I done this on my game and it handles really well, but I haven’t tried it with image lables

Nevermind, tween sizing I never tried.

@NyrionDev @Gusshiy @HappleMan @EliteSniperBoss123
any ideas??

earlier i changed the code abit, so there is this original edition but there is also this one, both still only have the same problem. :confused:

1 Like

What exactly isn’t working? Can you chuck a print after the MouseButton1Click function. Are the rest of the prints working?

screenGui.button.bruh:TweenSize(Udim2.new(remainingprice, 0, 1, 0), "In", "Linear", 1)

Is remaining price a gui object? Udim2.new requires 4 values, not 3. Can you try use Enum for In and Linear.

Btw, you defined bruh already, you can just do bruh:TweenSize

bruh.BackgroundColor3 = ShopColor
Bruh is a roundify gui object, you should change the ImageColor instead,

1 Like

im trying to set an integer number as a price, and then if a player clicks the text button it will take their money and invest it into buying the gear. the tween is a progress bar that fills up as money is invested, and is filled when the gear is fully invested. The tween is not moving, and all prompted print statements are appearing.

there are four values there, it is just tweening the first one, which is the scaled X coordinate, to the division of the investment/fixed price.

edit: wait, i disabled another script and it started working?? hold on…

1 Like

Is Change being stored as a string? If so, try to substitute Change for tonumber(Change) Also, I found out that "In" should be replaced with Enum.EasingDirection.In. If this doesn’t work, then I’m clueless.

1 Like

it works! i disabled a script that was somehow interfering, and with a lot of tweaking, works perfectly!

1 Like