generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: MouseEnter/Leave

Previous Thread :: Next Thread 
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
21 Jun 2017 05:23 PM
When my mouse enters, it works fine, but not when my mouse leaves the ImageLabel.
It also works in Studio, but no in-game. And yes, I am using a local script.

script.Parent.MouseEnter:connect(function()
script.Parent.Visible = false
script.Parent.Parent.StartMenuButtonGlow.Visible = true
end)

script.Parent.Parent.StartMenuButtonGlow.MouseLeave:connect(function()
script.Parent.Visible = true
script.Parent.Parent.StartMenuButtonGlow.Visible = false
end)


Pineapples do not belong on Pizza
Report Abuse
cowsoncows is not online. cowsoncows
Joined: 11 Oct 2013
Total Posts: 2522
21 Jun 2017 05:32 PM
Test it in studio by going to the test tab ontop and clicking 'Start' or something like that. Then test it and check the output.
Report Abuse
LeRiceFarmer is not online. LeRiceFarmer
Joined: 08 Jan 2012
Total Posts: 2583
21 Jun 2017 05:39 PM
I use MouseEnter and MouseLeave all the time in local scripts are it works fine for me.

The only difference is that when I do it I would write it like this:

function onEnter()
script.Parent.Visible = false
script.Parent.Parent.StartMenuButtonGlow.Visible = true
end
script.Parent.MouseEnter:connect(onEnter)


function onLeave()
script.Parent.Visible = true
script.Parent.Parent.StartMenuButtonGlow.Visible = false
end
script.Parent.MouseLeave:connect(onLeave)

I only use that type of function to call other functions.




Report Abuse
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
21 Jun 2017 05:40 PM
There is no problem being stated in the output. The MouseEnter/Leave works wonderfully in studio. Sadly not in-game. :/


Pineapples do not belong on Pizza
Report Abuse
LeRiceFarmer is not online. LeRiceFarmer
Joined: 08 Jan 2012
Total Posts: 2583
21 Jun 2017 05:43 PM
Try the way I wrote it.

It usually works for me.

If not IDK what is wrong.

But also, sometimes using MouseLeave glitches if you move your mouse off the GUI too quickly.


Idk if it is just me or not.


Report Abuse
oldsteve223 is not online. oldsteve223
Joined: 07 May 2012
Total Posts: 7658
21 Jun 2017 05:45 PM
I think the problem is that you didn't set a MouseEnter function for StartMenuButtonGlow, only MouseLeave. I'm not sure that works.
Report Abuse
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
21 Jun 2017 05:47 PM
@ LeRiceFarmer

I have tried. It won't work in studio anymore.

So I am gonna create a different way for it to function.


Pineapples do not belong on Pizza
Report Abuse
LeRiceFarmer is not online. LeRiceFarmer
Joined: 08 Jan 2012
Total Posts: 2583
21 Jun 2017 06:59 PM
That's weird, ill look at some of my GUI's with that and see what the coding is


Report Abuse
LeRiceFarmer is not online. LeRiceFarmer
Joined: 08 Jan 2012
Total Posts: 2583
21 Jun 2017 07:07 PM
Yeah I think its the coding inside the function, nothing is wrong with MouseEnter/MouseLeave


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image