When connecting a function to an event, autocomplete decides to add parenthesis as if it were a function call. When I remove the parentheses that autocomplete added, it removes the parenthesis I needed for the connect method.
When Players isn’t defined as a variable, all of this goes away, which is the expected and ideal behavior of autocomplete regarding parenthesis.
I think all of autocomplete is having issues, when I define a module with require, whenever I want to use values in the module, it doesn’t show any autocomplete options plus it doesn’t show that the variable is a table value even though the module returns a table.
This bug has been happening ever since I’ve started programming in Studio (2016!)
I’ve always just ignored it and removed the parenthesis after they’ve been inserted, but it’s nice to see it’s getting fixed!
Now the autocomplete will add parentheses only if the function you connected is returning another function, which mean it will decide parentheses is needed by type checking.
Let us know if you still see the unexpected parentheses from autocomplete, thanks!
Hi! We’ve added this to requests we’re looking at with other improvements to Script Editor autocomplete. We’ll update where when we have progress, thanks!