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

What Does "_G" Mean?

Asked by
Mauvn 100
9 years ago

I've searched on the wiki but i cannot find it, here is my last resource.

1 answer

Log in to vote
3
Answered by 9 years ago

A quick wiki search will bring you to this page: http://wiki.roblox.com/index.php?title=Global_function

A _G command essentially holds a variable or a function that can be used in other scripts (_G meaning global). So if I went_G.Cats = "Cats" that would save the word cats in a global variable. print(_G.Cats) -- "Cats"

Also just be aware that Global values saved in a localscript will not be available to server scripts and vice versa.

0
Thanks dude you explain very well! Mauvn 100 — 9y
Ad

Answer this question