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: is their a mousehover event for a gui?

Previous Thread :: Next Thread 
captainbacon is not online. captainbacon
Joined: 02 Nov 2006
Total Posts: 596
07 Jan 2016 04:38 AM
I'm making something where you hover over a GUI and then it will play a sound, how will i be able to do this?


Report Abuse
WoolHat is online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
07 Jan 2016 05:01 AM
Gui.MouseEnter:connect(function()
sound:Play()
end)
Report Abuse
Kie413Games is not online. Kie413Games
Joined: 06 May 2010
Total Posts: 3896
07 Jan 2016 05:02 AM
http://wiki.roblox.com/index.php?title=API:Class/GuiObject/MouseEnter
http://wiki.roblox.com/index.php?title=API:Class/GuiObject/MouseLeave
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
07 Jan 2016 06:33 AM
^ Ignore those.

This would be a better way to get when a mouse enters / leaves a gui object.

Gui.Button.InputBegan:connect(function(Input, GPE)
if not GPE then
if Input.UserInputType.Name == "MouseMovement" then
print("mouseentered")
end
end
end)

Gui.Button.InputEnded:connect(function(Input, GPE)
if not GPE then
if Input.UserInputType.Name == "MouseMovement" then
print("mouseleft")
end
end
end)
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