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 » Scripting Helpers
Home Search
 

Re: getChildren's Position - Help

Previous Thread :: Next Thread 
xSpectrumWolfx is not online. xSpectrumWolfx
Joined: 30 Nov 2011
Total Posts: 2858
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 is not online. hachibey
Joined: 09 Jun 2007
Total Posts: 518
06 Jan 2014 03:06 PM
Object isnt defined
Report Abuse
xSpectrumWolfx is not online. xSpectrumWolfx
Joined: 30 Nov 2011
Total Posts: 2858
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 is not online. 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
xSpectrumWolfx is not online. xSpectrumWolfx
Joined: 30 Nov 2011
Total Posts: 2858
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
xSpectrumWolfx is not online. xSpectrumWolfx
Joined: 30 Nov 2011
Total Posts: 2858
06 Jan 2014 03:26 PM
WTF, OHHHH!!! I missed that completely, I was looking at the part before it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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