|
| 10 Jul 2012 06:57 PM |
So this is the code I have.. For some reason I can find the name of the 'child' but not the Size..
Move.Click:connect(function() Newc = nil if Moving == false then function getDescendants(m,descendants) descendants=descendants or {} for i,c in pairs(m:GetChildren()) do table.insert(descendants,c) getDescendants(c,descendants) end return descendants end descendants=getDescendants(New) print(descendants[1]) for i = 1, #descendants do Newc = Instance.new("ScreenGui", game:GetService("CoreGui") ) local button = Instance.new("TextButton", Newc) local child = New:FindFirstChild(descendants[i], true) -- using recursion to locate the value in the table print(child.Name) -- works button.Size = UDim2.new(0.5,0,0,0 + child.Size) -- cant preform arithmetic on a nil value button.Text = "Click to move" button.Position = descendants.Position end else Newc:Remove() Moving = true end end)
any ideas on what I can do? Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:12 PM |
bump
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jul 2012 07:16 PM |
congrats on first post..? lol xD but neither do i.
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:16 PM |
Lol. I'm on an alt.
Got 1 day'ed |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:19 PM |
haha nice, what for? and main?
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:32 PM |
bump..
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:49 PM |
Bump? D:
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|
Zulsoras
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 963 |
|
|
| 10 Jul 2012 07:56 PM |
| can you tell me what your trying to do with the script? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 07:57 PM |
| Are you sure that whatever the variable "child" is an object that has "Size" as a propertie of it? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 08:25 PM |
its a Frame within a GUI, so im pretty sure it does..
Saving for PSTF.. 20k/60k-ish :/ |
|
|
| Report Abuse |
|
|