Connecting with parameters causing error

Im making a function and connecting with parameters is causing this error

1 Like

You cannot pass values like that, if there is a value to pass, Roblox will automatically pass it, like when a player joins.

I believe it has to do with how you call the Connect with custom parameters, see this solution here:

By passing buttonHover(), you pass the value which is returned by this function.

However, you need to pass a function itself to the first parameter of Connect. That’s why you either do:

signal:Connect(buttonHover)

-- or with custom parameters:

signal:Connect(function()
  buttonHover('some', 'parameters')
end)