GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 12 Dec 2016 11:49 AM |
| how to make local main = script.Parent:WaitForChild('theDisplay').Frame.Backing. refresh everytime something is added inside it, or removed. like buttons |
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
|
| 12 Dec 2016 11:54 AM |
http://wiki.roblox.com/index.php?title=API:Class/Instance/ChildAdded http://wiki.roblox.com/index.php?title=API:Class/Instance/ChildRemoved |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 12 Dec 2016 11:59 AM |
yeah but
workspace.ChildAdded:connect(function(instance) local main = script.Parent:WaitForChild('theDisplay').Frame.Backing
end)
for i,v in next, main:GetChildren() do -- says unknown global main v.MouseButton1Down:connect(function() SelectGui(v) end)
|
|
|
| Report Abuse |
|
|
|
| 12 Dec 2016 12:05 PM |
You got a lot of problems, here's the finished result
workspace.ChildAdded:connect(function(instance) local main = script.Parent:WaitForChild('theDisplay').Frame.Backing
for i,v in next, main:GetChildren() do -- says unknown global main v.MouseButton1Down:connect(function() SelectGui(v) end) end end) |
|
|
| Report Abuse |
|
|