- i have a gui and and when mouse enters it plays an tween but tween not works perfectly
video:
script:
local holder = script.Parent.Holder
local ts = game:GetService("TweenService")
local mainUi = holder["Main pet menu"]
local hoverSound = script.ui_hover_ugd
local easingStyle = Enum.EasingStyle.Back
local easingDirection = Enum.EasingDirection.Out
local endingSizeimage = UDim2.new({0.069, 0},{0.173, 0})
local StartingSizeimage = UDim2.new({0.061, 0},{0.16, 0})
local hoverButtonGradient = ts:Create(script.Parent.ImageButton.UIGradient, TweenInfo.new(0.2, easingStyle, easingDirection), {Offset = Vector2.new(0,1)})
local hoverButtonGradient2 = ts:Create(script.Parent.ImageButton.UIGradient, TweenInfo.new(0.2, easingStyle, easingDirection), {Offset = Vector2.new(0,0)})
local hoverButtonSize1 = ts:Create(script.Parent.ImageButton, TweenInfo.new(0.2, easingStyle, easingDirection), {Size = StartingSizeimage})
local hoverButtonSize2 = ts:Create(script.Parent.ImageButton, TweenInfo.new(0.2, easingStyle, easingDirection), {Size = endingSizeimage})
local rot = ts:Create(script.Parent.ImageButton, TweenInfo.new(0.2, easingStyle, easingDirection), {Rotation = -10})
local rotstart = ts:Create(script.Parent.ImageButton, TweenInfo.new(0.2, easingStyle, easingDirection), {Rotation = 0})
script.Parent.ImageButton.MouseEnter:Connect(function()
hoverSound:Play()
hoverButtonSize2:Play()
rot:Play()
end)
script.Parent.ImageButton.MouseLeave:Connect(function()
hoverButtonSize1:Play()
rotstart:Play()
end)```