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

Is there any way to have one variable that can be used by multiple scripts?

Thanks for your knowlege.

2 comments

0

You have multiple options, but the two I would use are, _G (try to avoid these) or module scripts (Highly recommended)

0

I just used events.

2 answers

✓ Accepted answer

Module Scripts can store things like tables, functions or variables.

Other scripts access the module script using the require() function.

1 comment

0

Bonus tip: Always put your require() functions at the beginning of your scripts, it improves readability, and makes your scripts look much nicer.

You could just use values... Like an IntValue, StringValue, BoolValue, ect.

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