Help pls with _G!

Why do I declare a variable in one script together with _G and in another script I print the value of this variable as a result nil
at the same time I print the variable also specifying _G
also, I don’t really know what client or server scripts are, but this is a normal script not written local

1 Like

_G is a global variable pointing to the “default module script”. So where ever you access _G it points to that same module, no matter your location within the DataModel.

can it be simpler? I’m just a beginner

Can you provide code? Thanks :slight_smile:

thanks, I already understood the problem was that the variable most likely did not have time to initialize before I printed it

1 Like

Okay :slight_smile: When make sure to mark your Reply as ‘Solution’ so other people can see the Solution!