Hi Guys, I have an issue here. I have a script that uses a for loop to capture my button presses for my gui as I am creating multiple buttons via a script. the thing is, I need to know how to pass a value through as well, but i keep on getting an error "Attempt to connect failed: Passed value is not a function" when i first load the game, when the script first runs.
for i,v in pairs(list:GetChildren()) do
v.MouseButton1Click:Connect(ButtonPress(v.Selection.Value))
end
when i press the button, any button i am getting a "attempt to call a nil value" error. any help guys?
Inside all of these buttons is a string value called "selection" - and when i press these buttons, i want it to return the value of selection that is in that specific button.

1 comment
Wonderful, thank you! it just goes to show that coding at 4am isnt my smartest of ideas :D