Hello.
So, a few days/weeks ago, I got a bug (i don’t know if this is really a bug or my fault). Basically, when you clicked enter after the function (ex. (function())- presses enter - end) appears), but this is broken for me for some reason (it does it without “)”). Also after pressing Enter after then. Still same thing. In this case, even end doesn’t appear.
Can I fix that somehow in settings and are you experiencing that?
I have also noticed this recently, I checked my studio settings to see if it had anything to do with that but no luck.
I think it’s a auto-correct/fill bug in the script editor.
Your post may be confusing to some new programmers. Not every function end requires a closing bracket, and in fact the closing bracket is inconsequential to the function’s definition.
A function defined with a name, and not inside a table, most likely requires absolutely nothing after its end, and providing close parenthesis ) will break your code. However, an anonymous function passed as the only argument to a call to built-in method :Connect( callback ) on an RBXScriptSignal object will need that close parenthesis from the Connect call to follow the end of the callback function.
Similarly, if you were defining a function in a table, your end may be followed by a comma ,. It doesn’t mean
a function will always need an end,
I think the only thing you can say with certainty is that a function will always need an end and an open parenthesis will always need to be closed. The two are mutually exclusive.