I’ve put print statements in both of these. Both do in fact run through the lines of code when they are supposed to- it’s just that there’s absolutely zero movement.
The size isn’t too small to notice either, it’s using relative scale and these are the exact same values I have in another TweenSize from earlier (that works perfectly)
First, ensure that script.Parent is a GuiObject of some sort.
If you can ensure that, then I would recommend the use of TweenService instead of TweenSize. Personally, I find it to work better than TweenSize. Below is code for the equivalent of using TweenSize with TweenService:
local TweenService = game:GetService("TweenService")
local mouseEnterTweenInfo = TweenInfo.new(.2, Enum.EasingStyle.Back, Enum.EasingDirection.In)
local mouseEnterGoal = {}
mouseEnterGoal.Size = UDim2.new(.2, 0, .2, 0)
local mouseEnterTween = TweenService:Create(script.Parent, mouseEnterTweenInfo, mouseEnterGoal)
local mouseLeaveTweenInfo = TweenInfo.new(.2, Enum.EasingStyle.Back, Enum.EasingDirection.Out)
local mouseLeaveGoal = {}
mouseLeaveGoal.Size = UDim2.new(.1, 0, .1, 0)
local mouseLeaveTween = TweenService:Create(script.Parent, mouseLeaveTweenInfo, mouseLeaveGoal)
script.Parent.MouseEnter:Connect(function()
mouseEnterTween:Play()
end)
script.Parent.MouseLeave:Connect(function()
mouseLeaveTween:Play()
end)