I have been trying to make a responsive UI for the main menu of my game where when your mouse hovers over the ImageButton, it slightly moves upward.
I’ve written a pretty simple script for this, but for some reason, it does not work and I can’t lay my finger on the issue correctly. If anyone has an idea on how to make this work, please let me know
Here is the code:
local TweenService = game:GetService('TweenService')
local gui = script.Parent
local tweenInfo = TweenInfo.new(
.5,
Enum.EasingStyle.Quart
)
local goal = {
gui.Position.Y.Scale == -0.025,
}
local playTween = TweenService:Create(gui, tweenInfo, goal)
gui.MouseEnter:Connect(function()
playTween:Play()
end)