Deprecation is a topic you'll hear often. Everyone will tell you that deprecated items should be avoided, but why?
Objects, properties, methods or events that become deprecated could be removed at any time by ROBLOX, because you're not suppose to be using them anymore anyways. Normally deprecated items aren't removed instantly to give people time to become used to new methods, or so they don't break older games.
Why are items deprecated?
Items can be deprecated for many reasons. The most common reason is that the item has been superseded, or replaced. Other times items can be deprecated because they don't fit with ROBLOX standards, or if they contain a typo.
How do you know if an item is deprecated?
To tell if an item is deprecated all you have to do is check the wiki! Simply look up your item's name on the ROBLOX wiki, and on the page it will tell you if the item is deprecated at the top. If it is, you should see this,
There's also this article, or the 'deprecated members list '.
Use Destroy(), not Remove()
Remove() did serve a purpose, but now it's deprecated in favor of Destroy(). This is because
Remove() left the Instance it was called on still existing, just with no parent. The Destroy method now locks the parent of the object it was called on to nil and prepares it for junk collection. This blog explains more about it.
Stop using Mouse Key Events
While the mouse is capable of processing user key presses, it has been deprecated for a good reason. Two new services are now available, being
ContextActionService, which offers much more flexibility when processing user actions in the form of an input object. This object includes more in depth information about the action such as state, type and key pressed. These services can also process actions from devices, controllers and virtual reality.
Don't use Hopperbins
DataPersistence is also deprecated
Capitalization Of Methods
There are several methods that have been deprecated because of their capitalization. Their capitalization being
lowerCamelCase. Examples would be
findFirstChild. ROBLOX tries keeping their methods
UpperCamelCase. Other deprecated methods that most don't know about are listed here.