Surface Gui Tween Not Working

Hello!

I am trying to create this effect where when you hover your mouse over a button it expands.

However there appears to be an issue with my script and I am not entirely sure what it is.
image


The script:

local tweenservice= game:GetService("TweenService")
local Image = script.Parent

local goal = {}

goal.Size = UDim2.new(0,150,0,150)


Image.MouseEnter:Connect(function()
	script.Parent["Gui mouse hover sound"]:Play()
	local tweeninfo = TweenInfo.new(

		1,
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		0,
		false,
		1	
	)
	tweenservice:Create(Image, tweeninfo, goal)
	

end)

The sound effect works however the tween itself doesn’t.

I don’t usually work with the tween service so I apologies if its a simple mistake.

All help is appreciated!

You aren’t calling :Play() on the tween

	tweenservice:Create(Image, tweeninfo, goal):Play()
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.