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

What does this shared built-in function do?

It's called 'shared' and if you type it into script editor you will see it shows up as a built-in function and Roblox doesn't provide any documentation on it. Does anyone know what it is/what it does?

If you open a script and simply type in "shared" it will show up.

1 comment

0

shared is not a function. It is a table. It works exactly like _G, but don't use it either, use module scripts instead if you want global variables.

1 answer

✓ Accepted answer

shared is a global table that is used to store variants that can be shared between scripts of the same kind.

shared shares the same purpose of _G

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