Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Menu Error (Please Help)?

I have a script I've made that is suppose to change the font and size of my GUI button when entered and revert it back to it's original size when out of the buttons perimeter, for some reason it's not working like I thought it would be, any answers?

Player = game.Players.LocalPlayer
Menu = script.Parent
Play = Menu.Play
about = Menu.About

function MouseEnterPlayButton()
	Play.FontSize = "Size42"
	Play.Size = UDim2.new(0.45, 0, 0.225, 1000)
end

function MouseLeftPlayButton()
	--166, 166, 166
	Play.FontSize = "Size32"
	Play.Size = UDim2.new(0.3, 0, 0.15, 0)
end

Play.MouseEnter:connect(MouseLeftPlayButton)
Play.MouseEnter:connect(MouseEnterPlayButton)


2 answers

✓ Accepted answer

The Problem

The problem is that you have registered the MouseLeftPlayButton function to the MouseEnter event.

The Solution

Change the MouseEnter to MouseLeave on the connection to MouseLeftPlayButton.

I hope this answer helped you!

This discussion is preserved as it was. New answers, comments, and votes are closed.