I see it in a lot of Scripts... and I once saw it in Youtubes' Mouse Sensitivity Script... _G Mouse.Sensitivity = 0.5 etc... so plz help me with the meaning...
✓ ANSWER ACCEPTED
_G Help? Kinda Complicating
1 answer
✓ Accepted answer
Funny you should post something about that minutes after I ask about it, lol.
_G is a way to declare and index variables and functions throughout your entire place. If you declare a _G function in one script, and use it in another, the place will know what to do.
Format:
_G['FunctionName'] = function (parameter)
--stuff
end
Example:
--Script 1
_G{'AddNumbers'] = function (num1,num2)
return num1 + num2
end
-- Script 2
print (_G.AddNumbers (3,4))
Output will be 7
~Just remember that if someone answers your question you and that person will get reputation if you accept their answer. There should be a button for it near the voting on the answer. ~
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
I know lol... I like ur answer even though kinda confusing lol... also, could u plz tell me about Youtube's Mouse Sensitivity Script, y there's _G?
Thanks. I never understood that. +1
Mouse Sensitivity was probably a function the user on Youtube was trying to manipulate via _G functions. _G is not directly related to Mouse Sensitivity, but if you want, I can help you try to comprehend it if you post the code on a new thread.
It should also be noted that LocalScripts cannot access the _G used by scripts.