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.
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!