"end" or ")" don't appear anymore when pressing enter

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?

Thank you!

1 Like

This is a bug that many have encountered, but i’m pretty sure it has been reported before

1 Like

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.

My ends don’t have a ) and are indented.

Personally i get the opposite, too many closing parentheses are added.

coroutine.resume(coroutine.create(function()

end))) -- adds an extra )
2 Likes
function(()

There shouldn’t be an extra bracket at the end.
Anyway, you can always count the end’s, don’t rely on on roblox to do it for you!

a function will always need an end)
and if statement will always need an end

They just keep adding on for however many functions/statements you have!

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.

2 Likes

I meant regular roblox functions and statements, but yes you are right. :slightly_smiling_face:

1 Like

I don’t really know what you mean by regular, I mostly see categorisation of anonymous or named.

Either way, functions never need close parenthesis to end them, it’s the outer context which requires it.

I mean, it’s not working as it used to work.

Found a fix! Just disable the beta script wrapping features. Should fix everything had this problem before

1 Like

Thank you so much!
I’ve disabled some beta features, but which features where the actual ones?

You don’t have to worry about it.
It’s just some feature that probably not finished, remember it’s in BETA