Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Menu Error (Please Help)?

Asked by
leepko 10
8 years ago

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

Log in to vote
0
Answered by
xAtom_ik 574 Moderation Voter
8 years ago

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!

Ad
Log in to vote
0
Answered by
NRCme 0
8 years ago

The best that I could help you with is to go here

Answer this question