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: strange issue..

Previous Thread :: Next Thread 
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
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
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
10 Jul 2012 07:12 PM
bump

Saving for PSTF.. 20k/60k-ish :/
Report Abuse
IICenter2 is not online. IICenter2
Joined: 27 Jun 2012
Total Posts: 2
10 Jul 2012 07:14 PM
No clue...
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
10 Jul 2012 07:16 PM
congrats on first post..? lol xD but neither do i.

Saving for PSTF.. 20k/60k-ish :/
Report Abuse
IICenter2 is not online. IICenter2
Joined: 27 Jun 2012
Total Posts: 2
10 Jul 2012 07:16 PM
Lol. I'm on an alt.


Got 1 day'ed
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
10 Jul 2012 07:19 PM
haha nice, what for? and main?

Saving for PSTF.. 20k/60k-ish :/
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
10 Jul 2012 07:32 PM
bump..

Saving for PSTF.. 20k/60k-ish :/
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
10 Jul 2012 07:49 PM
Bump? D:

Saving for PSTF.. 20k/60k-ish :/
Report Abuse
Zulsoras is not online. 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
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
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
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
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
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