|
| 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
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 07 Jan 2016 05:01 AM |
Gui.MouseEnter:connect(function() sound:Play() end) |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|