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

Do global values work going to a local script from a regular script?

I just have a question: In a REGULAR SCRIPT can you set a global value to true like this:

_G.Activate = true

And then use that in a LOCAL SCRIPT like this:

if _G.Activate == true then
	print("Does it work?")
end

Or can you only use a global value like this through the same type of script?

1 answer

✓ Accepted answer

No, the client has its own global variables, and so does the server. Your only option is to use RemoteEvents, which is safer anyway.

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