|
| 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 |
|
|
| |
|
|
| 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 |
|
|
| |
|
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 |
|
|
| |
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 04 Apr 2013 04:37 PM |
| Are you using this in a LocalScript? |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
|
| 04 Apr 2013 04:43 PM |
| Size and AbsoluteSize are different. i believe AbsoluteSize returns in pixels. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 04 Apr 2013 05:52 PM |
For some reason, it looks like AbsoluteSize and position aren't working properly, one moment.
(╯°□°)> KMXD |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 04 Apr 2013 08:08 PM |
AbsoluteSize returns a UDim2 as well.
Use AbsoluteSize.#.Offset |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2013 08:09 PM |
| Sorry, my brain melted. Is frs parents size greater than 0, 0? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|