So, I made a :TweenPosition() to occur whenever a person hovers their mouse to a textbutton, since I am doing this for multiple buttons I decided to use a for loop to loop through all of the buttons and give them that function; the consequences of this, is I wouldn't be independent to give the TweenPosition specific UDims for each button. So I decided to go with:
button.MouseEnter:connect(function()
for index, object in pairs(screen:findFirstChild("Objects"):GetChildren())
do
button["button_label"]:TweenSize(
button["button_label"].Size + UDim2.new(0, 15, 0 , 0),
"Out",
"Quad",
.5,
true
)
end
end)
button.MouseLeave:connect(function()
button["button_label"]:TweenSize(
button["button_label"].Size - UDim2.new(0, 15, 0 , 0),
"Out",
"Quad",
.5,
true
)
end)
end
end
When I do this, the tween returns me the Button's size as a random size chosen from 0 to 15, therefore when I continue with -UDim2.new(0, 15, 0, 0) It subtracts an unequal number and therefore exceeds below its original size. Can anyone give me an idea of what I could do here to match the given size and the number I'll subtract so it can return to its original size when I remove my mouse from it. **Thank you! I have more to improve! **
