Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Is it true that it's proper to use :Connect instead of :connect while scripting?

Asked by 7 years ago
Edited 7 years ago

Someone told me that I could improve by using :Connect instead of using :connect. Does it matter which one I use? I think it's one of those things that can work both ways.

Example:

script.Parent.MouseButton1Click:Connect(function()
1
Use Connect. If ROBLOX says its deprecated then it's best to use the version they support. Azarth 3141 — 7y
0
I use :connect, so I guess I am done. TinyScripter 70 — 7y

2 answers

Log in to vote
3
Answered by
cfiredog 274 Moderation Voter
7 years ago

:connect() is deprecated, meaning that Roblox may remove its functionality at any point (i.e. the code is at risk of breaking). Items are deprecated when they are no longer meant to be used for an assortment of reasons. Some examples are that the original method was a typo or does not look like other property and method names.

It is recommended to use the provided alternative, :Connect(), as this method does not run the risk of breaking your code and will continue to be regularly updated by Roblox.

Ad
Log in to vote
-1
Answered by 7 years ago

Absolutely does not matter. Use either one. He probably just thought that because the wiki says that 'connect' is deprecated.

Answer this question