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: Gui...

Previous Thread :: Next Thread 
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Apr 2013 06:06 PM
local fr = Instance.new("Frame",script.Parent)
fr.Visible = false
fr.Size = UDim2.new(1,0,1,0)
_G.Size = {fr.AbsoluteSize.X,fr.AbsoluteSize.Y}
print(table.concat(_G.Size,","));
fr:Destroy()


Why is it that this always prints
0,0
?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Apr 2013 06:15 PM
Bleh
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Apr 2013 06:29 PM
Complicated bump...

for _,n in next,Forms["Game Creation And Development"]["Scripting Helpers"]:GetChilren() do
if n.Name == "Gui..." and n.Poster.Name == "notsopwnedg" then
Delay(1,function()
Spawn(function()
Bump(n)
end)
end)
end
end

Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Apr 2013 07:05 PM
:/
Report Abuse
MrTechn0 is not online. MrTechn0
Joined: 23 Nov 2012
Total Posts: 1252
03 Apr 2013 07:14 PM
i will help u if u help me in my thread


~#YOLO,You oughta look out!~
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 04:35 PM
Bump..
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
04 Apr 2013 04:37 PM
Are you using this in a LocalScript?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 04:40 PM
Yep...
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
04 Apr 2013 04:42 PM
Excuse me if this is wrong but…
Should _G.Size = {fr.AbsoluteSize.X,fr.AbsoluteSize.Y} not just be Size.#?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 04:43 PM
Size and AbsoluteSize are different. i believe AbsoluteSize returns in pixels.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 05:00 PM
...
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 05:46 PM
...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
04 Apr 2013 05:52 PM
For some reason, it looks like AbsoluteSize and position aren't working properly, one moment.

(╯°□°)> KMXD
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 06:35 PM
Bleh
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 07:08 PM
bumpy
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 08:06 PM
Bump?!?!?!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 08:08 PM
AbsoluteSize returns a UDim2 as well.

Use AbsoluteSize.#.Offset
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 08:09 PM
Sorry, my brain melted. Is frs parents size greater than 0, 0?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 08:10 PM
Actually, when you instance a new GUI it can go a bit strange... As its 1, 1 try getting frs parents size instead.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 08:16 PM
local fr = Instance.new("Frame",script.Parent)
fr.Visible = false
fr.Size = UDim2.new(1,0,1,0)
_G.Size = {fr.AbsoluteSize.X.Offset,fr.AbsoluteSize.Y.Offset}
print(table.concat(_G.Size,","));
fr:Destroy()


- Players.Player1.PlayerGui.ScreenGui.LocalScript:4: attempt to index field 'X' (a number value)
- Script "Players.Player1.PlayerGui.ScreenGui.LocalScript", Line 4
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
04 Apr 2013 08:33 PM
...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Apr 2013 12:21 AM
There is no offset property of x or y. Your script should've worked before, but there seems to be a problem with absoluteposition/size, at least with me. I used to be able to work with them, but now they never change.

(╯°□°)> KMXD
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