Hey!
I have a quick question for anyone that has an answer. I created this nice tween animation for my buttons. Although as you can see from the attached file, the “+300 Damage” doesn’t shrink with the image button. How else can I do this? I want to make them both look like the same image, but with dynamic text. I haven’t tried much as I can’t really think of anything else to search on Google.
https://i.gyazo.com/6da795aabe6c83c72c489bcf6ea81dc3.mp4
Current Code
local Frame = script.Parent:WaitForChild('Frame')
for i, v in pairs(Frame:GetChildren()) do
if v:IsA('ImageButton') then
v.MouseButton1Down:Connect(function()
v:TweenSize(UDim2.new(0.155, 0, 0.747, 0), nil, nil, 0.2, true)
end)
v.MouseButton1Up:Connect(function()
v:TweenSize(UDim2.new(0.188, 0, 0.906, 0), nil, nil, 0.2, true)
end)
v.Texts.AutomaticSize = Enum.AutomaticSize.XY
end
end