of     1   

coolsamoXD1234
#111085533Sunday, August 25, 2013 11:16 PM GMT

Step by step plox: children[i].Touched:connect(function (hit) touched(hit,children[i]) end)
ZachBloxx
#111086196Sunday, August 25, 2013 11:22 PM GMT

When children[i] is touched the Touched event fires and a function named 'touched' is executed with some parameters.
coolsamoXD1234
#111092211Monday, August 26, 2013 12:15 AM GMT

I know that, But I don`t get how to set the parameters. Like if I wanted to change that for a GUI button instead Button.Touched:connect(Clicked) How would I reference the Button in the function "Clicked"
ScrewDeath
#111092452Monday, August 26, 2013 12:17 AM GMT

Button = THEBUTTON function Clicked() --blahblah Button.Anchored = false --Like dat? end Button.Touched:connect(Clicked)
coolsamoXD1234
#111093530Monday, August 26, 2013 12:26 AM GMT

No, It's a GUI button, I'm trying to assign multiple buttons to that function with a loop I need to reference the button in the function so like: Assume everything is defined right. Children = GUI:GetChildren() for i = 1, #Children do Children[i].MouseButton1Click:connect(Clicked) function Clicked(Part) --Script Children[i]:Destroy() end Using Children[i] won't work though.
coolsamoXD1234
#111103748Monday, August 26, 2013 1:56 AM GMT

Bump
coolsamoXD1234
#111112298Monday, August 26, 2013 3:13 AM GMT

Someone plox?
DataStore
#111113448Monday, August 26, 2013 3:25 AM GMT

local GUI = script.Parent local Child = GUI:GetChildren() for _,v in pairs(Child) do v.MouseButton1Click:connect(function() v:Destroy() end) end ...?

    of     1