Connecting Events Without Function

I have been scripting for over a year and passing events through connect, I have always done it the same way,

Button.MouseButton1Click:Connect(function()
Event:FireServer("ButtonClicked")
end)

But I’m curious if I can condense this and just use “connect”, or if connect can be used for anything else other than function
Example Suggestion:

Button.MouseButton1Click:Connect(Event:FireServer("ButtonClicked"))

So is there any other way to use connect, or is it always a function.

1 Like

No because that would use the result of RemoteEvent:FireServer as the argument to RBXScriptSignal:Connect. The former doesn’t return anything anyway so you would get something like Passed value is not a function in the output.

1 Like