Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

has connect() been deprecated?

So i've been hearing around that connect() has been deprecated and a huge majority of my scripts use this. the script below is a section of my script.

plrGui.Main.EditHotel.MouseButton1Click:Connect(function()
	--GUI button clicked do stuff.
end)

would that mean I need to put something else where connect() is written? Or am I getting this completely wrong

3 comments

3

Lowecase connect() is deprecated, not Connect(). I'd mostly use Connect() as it's not deprecated. If you use connect() It's still fine, nothing has happened w/ it getting completely removed so either way is practically fine.

2

To others who still use deprecated code: https://www.robloxdev.com/articles/Deprecation

3

Don't use deprecated methods, period. use Connect. And @xEiffel you shouldn't use deprecated methods, don't use them because "they still work". Bad argument.

1 answer

Hello, Yes the :connect() got deprecated, and you should't use it. You should use the :Connect()

And nothing is wrong with your code, just change :connect() to :Connect()

This discussion is preserved as it was. New answers, comments, and votes are closed.