Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to tween the size of an ImageButton?

Asked by 6 years ago

So I am trying to tween the size of an image button when a mouse hovers over it. Here is my code.

function size()
    script.Parent:TweenSize(0, 90, 0, 90)
end

function unsize()
    script.Parent:TweenSize(0, 75, 0, 75)
end

function buy()
--implement buy for each image button (IGNORE THIS)
end

script.Parent.MouseEnter:Connect(size)
script.Parent.MouseLeave:Connect(unsize)
script.Parent.MouseButton1Click:Connect(buy)  --ignore

The code is not working and I'm not sure why? Any help is much appreciated :)

1 answer

Log in to vote
1
Answered by 6 years ago

NEVERMIND I FORGOT UDim2 Thanks for reading anyway :)

Ad

Answer this question