✓ Accepted answer
If you want the button to enlarge, then you should use either a for loop (not recommended) or GuiObject:TweenSize() . You should TweenSize since it's automatically built-in, and doesn't require TweenService. Also, it makes smooth transitions.
local playButton = script.Parent.PlayButton
local quitGameButton = script.Parent.QuitGameButton
local mainFrame = script.Parent
playButton.MouseEnter:Connect(function()
playButton:TweenSize(UDim2.new(0.2,0,0.2,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1, false)
end)
playButton.MouseLeave:Connect(function()
playButton:TweenSize(UDim2.new(0.15,0,0.15,0),Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1, false)
end)
playButton.MouseButton1Click:Connect(function()
main.Frame.Visible = false
end)
quitGameButton.MouseEnter:Connect(function()
quitGameButton:TweenSize(UDim2.new(0.2,0,0.2,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1, false)
end)
quitGameButton.MouseLeave:Connect(function()
quitGameButton:TweenSize(UDim2.new(0.15,0,0.15,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1, false)
end)
quitGameButton.MouseButton1Click:Connect(function()
game.Players.LocalPlayer:Kick("You Left The Game")
end)