Is there any way to use parameters inside of a connection line? For example, if I had a function like this:
function awesomesupercoolfunction(parameter) print("Wow, " ..parameter .." is great.") end
And I wanted it to fire on a MouseEnter event,
creativenameforabutton.MouseEnter:connect(awesomesupercoolfunction)
or something like that, how would I go about doing this?
I tried
creativenameforabutton.MouseEnter:connect(awesomesupercoolfunction(parameter))
just in case it was that simple, but it wasn't. Is there any way to do this? I can accomplish what I want to do without it, it would just make the process much more simple. Any help would be appreciated!
Connect a new function
I know, it's not convenient, but it's the only way you're going to be able to give a generic function like that access to things like closures from inside a connection line.
MouseEnter:connect(function() return mySuperAwesomeFunc(thatParameterYouAlwaysWanted) end);