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

What are _G and _VERSION, what they are used for and how to use them?

I have noticed when I use for _, these _G and _VERSION were popping out. Can someone please explain what those are, what they are for and how to use them?

1 answer

✓ Accepted answer

_G are global variables mostly used in module scripts you might have seen it in games/plugin Basically _G is a table that you can assign things such as keys and values _G saves scripts like cross - scripts

You can access variables from different server side scripts. If you have this in one script

_G.player = "player"

print(_G.player)

OUTPUT: Player

If my answer helped make sure to accept.

Meanwhile _Version is A global variable (not a function) that holds a string containing the current interpreter version.

To learn more click here

2 comments

0

Thx.

0

server-side not server side

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