(Instance?) can literally be either (Instance) or ().
Not sure what to make of it, can’t think of any further explanation.
The Once method expects a function that takes 0 arguments: () -> (). You are currently passing it a function that takes 1 optional argument: (Instance?) -> ().
Yeah, but it will work even if you pass 0 arguments. I’d expect it to accept a function that can take 0 arguments, even if it’s optional…
Is there a workaround or a way to ignore the warning without having to wrap it in a lambda function?
Yeah it should work fine, but from a typechecking perspective these two function signatures are not equivalent, hence the warning. You could try casting the function or otherwise wrap it in an anonymous function that matches the expected type.
You can uhh cast it into :Once(SetEquipItem::()->())
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
