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

What does this shared built-in function do?

Asked by 5 years ago

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.

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. User#19524 175 — 5y

1 answer

Log in to vote
2
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

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

Ad

Answer this question