CptBenge
|
  |
| Joined: 22 Jun 2012 |
| Total Posts: 823 |
|
|
| 06 Aug 2013 05:19 AM |
I'm trying to create a script where if the Mouse Hovers over a brick it enables the Billboard Gui. If the mouse comes off it disabled. I tried using the MouseEnter and MouseLeave but I do not know how to use them in this script.
local brick = game.workspace.guibrick
brick.MouseEnter:connect(function() script.Parent.Enabled = true
brick.MouseLeave:connect(function() script.Parent.Enabled = false
Brick.MouseEnter:connect(function() Brick.MouseLeave:connect(function()
end end)
local guiObject = script.Parent.GuiObject guiObject.MouseEnter:connect(function() print("The mouse is hovering over the GUI") |
|
|
| Report Abuse |
|
|
CptBenge
|
  |
| Joined: 22 Jun 2012 |
| Total Posts: 823 |
|
| |
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 06 Aug 2013 05:22 AM |
1) Parts do not have 'MouseEnter' and 'MouseLeave' events, only GUI objects do. 2) You try to refer to 'Brick' when you made the variable 'brick'.
|
|
|
| Report Abuse |
|
|
CptBenge
|
  |
| Joined: 22 Jun 2012 |
| Total Posts: 823 |
|
|
| 06 Aug 2013 05:24 AM |
| Do you know an alternate for bricks then? If you hover your mouse over them? |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 06 Aug 2013 05:35 AM |
http://wiki.roblox.com/index.php/RBX.lua.PlayerMouse_(Object)
Perhaps combine the 'Move', along with the 'Target' property. Create a continuous loop which checks to see if a variable is false ("Moving"), if it is do your desired action to the target if it's not nil.
|
|
|
| Report Abuse |
|
|