

Module scripts have some common patterns that you can use to simplify your code and provide more flexibility over the features Roblox Studio provides.

If you require() a ModuleScript from both sides of the client-server-boundary, such as in a Script and a LocalScript, then the ModuleScript returns a unique reference for each side. The module itself doesn't run multiple times. Calling require() again returns the exact same reference, meaning that if you modify a returned table or Instance, subsequent require() calls return that modified reference. When you call require() on a ModuleScript, it runs once and returns a single item as a reference. Local PickupManager = require (ReplicatedStorage:WaitForChild( "PickupManager" ))
