Attempt to Connect Failed: Passed Value is Not a Function

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Im making a script that turns a bunch of lights on for nighttime using collection service.
    This part of the script in particular changes the light’s material and color in response to an event.

  2. What is the issue? Include screenshots / videos if possible!
    However, when connecting the function I get an error this error



    (For context, DaySignal and NightSignal are both Bindable Events in ReplicatedStorage)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried looking for other solutions but they seemed to be unrelated or unanswered.

Try changing local function to just function.

Can you post the full stack trace?

I did another test and it seems the function did run and i think maybe this error is actually for a different script altogether. Ill try some other things for now and reply if i find my previous problem to still be the case.

changing local won’t do anything here, function and connect are in the same scope.

It turns out that the code above is actually working perfectly fine, and that the error was actually for something else entirely, thanks for the help though! (and sorry for wasting your time!)