Tip: How to tell if ObjectValue.Value has been destroyed/is actually nil

There are several reasons why you should prefabricate over using Instance.new

Prefabrication in the context of Roblox scripting refers to the process of creating assets prior to runtime (outside of a script). This means that you would configure and organize the stats folder in Roblox Studio. The advantages of this are as follows:

  1. Bulk removal of boilerplate code.

  2. Ease of configuration; changing the initial state of your values, (re)organization, removing, and adding values is made easier.

  3. Visualization. You can better visualize the structure of your stats folder.

  4. Elimination of early-deployment. I won’t bother explaining the negative effects of early deployment as this article posted by a Roblox engineer covers them well. The image attached below also covers some benchmarks regarding deployment methods.

TL;DR: An asset should not be made a descendant of game until it and its descendants have been fully configured. Many Roblox developers do not do this, and it’s only tedious to go back and tweak the bulk boilerplate code. The associated problems are solved as a latent function of prefabrication

Additional benchmarking: