How do i make a tween script so when the player hovers the button postion goes a little bit up?
Preview
How do i make a tween script so when the player hovers the button postion goes a little bit up?
Preview
Is this what you meant?
local Button = script.Parent
local HoveredOverPosition = UDim2.new(0.4, 0,0.2, 0) -- Replace this with your own position, this is for when the player hovers over the button
local NormalPosition = UDim2.new(0.4,0,0.4, 0) -- Replace this too
Button.MouseEnter:Connect(function()
Button:TweenPosition(HoveredOverPosition, Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.5, true) -- Feel free to change the EasingStyle, etc.
end)
Button.MouseLeave:Connect(function()
Button:TweenPosition(NormalPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.5, true) -- Feel free to change the EasingStyle, etc.
end)
Yes thank you for helping me really helped
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.