|
| 06 Jan 2014 02:48 PM |
Mouse.Move:connect(function(x, y) local getMenu = sys.UI.Menu.CoreContainer.Main.Menu:GetChildren() for i = 1, #getMenu do if Mouse.X > getMenu[i].AbsolutePosition.x and Mouse.X < getMenu[i].AbsolutePosition.x + Object.AbsoluteSize.x and Mouse.Y > getMenu[i].AbsolutePosition.y and Mouse.Y < getMenu[i].AbsolutePosition.y + Object.AbsoluteSize.y then getMenu[i].HoverLine.Visible = true; else getMenu[i].HoverLine.Visible = false; end end
end)
--
12:40:58.546 - Players.Player1.Backpack.User Interface:30: attempt to index global 'Object' (a nil value) 12:40:58.546 - Script 'Players.Player1.Backpack.User Interface', Line 30 12:40:58.546 - stack end
--
I looked at the ROBLOX wiki and I seen how it prints the name. I can't seem to get the GUI absolute position. Any reason why? Also no it can't possibly be UDim2 because the previous version of my script worked without using it. |
|
|
| Report Abuse |
|
|
hachibey
|
  |
| Joined: 09 Jun 2007 |
| Total Posts: 518 |
|
| |
|
|
| 06 Jan 2014 03:12 PM |
print(Mouse.X > getMenu[i].AbsolutePosition.x)
Returns as true, I tried print testing getMenu[i].AbsolutePosition.x and Mouse.X by their selves. They are pretty much defined, I don't understand it. |
|
|
| Report Abuse |
|
|
hachibey
|
  |
| Joined: 09 Jun 2007 |
| Total Posts: 518 |
|
|
| 06 Jan 2014 03:20 PM |
No its not. Object.AbsoluteSize.x --Wtf is Object
http://www.roblox.com/ThisIsTheOriginalPoster-item?id=107458461
|
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 03:25 PM |
Fixed. >.<
Mouse.Move:connect(function(x, y) local getMenu = sys.UI.Menu.CoreContainer.Main.Menu:GetChildren() for i = 1, #getMenu do Object = getMenu[i] if Mouse.X > Object.AbsolutePosition.x and Mouse.X < getMenu[i].AbsolutePosition.x + Object.AbsoluteSize.x and Mouse.Y > getMenu[i].AbsolutePosition.y and Mouse.Y < getMenu[i].AbsolutePosition.y + Object.AbsoluteSize.y then getMenu[i].HoverLine.Visible = true; else getMenu[i].HoverLine.Visible = false; end end
end) |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 03:26 PM |
| WTF, OHHHH!!! I missed that completely, I was looking at the part before it. |
|
|
| Report Abuse |
|
|