I have multiple LocalScripts that are inside a player model, but what I have intended won't work unless there's a way to make thouse scripts' variables(values) available through all of them, but not through anything else. Also I want thouse scripts to still function properly even if i clone them to different players on the same game, same server.
For example, I want to be able to do something like this:
Script1: local x = 1
Script2: local x = script.Parent.Script1.variable(x) print(x)
Output: Script2: 1
Of course there is a reason why I can't simply make the variable inside the same script. It's because the variable will be modified by a loop and I already have a loop inside the script in which I would want to have that variable(value).
I've heard of a method that would make the variable available to all scripts, but if it is cloned, then there'll be just a mess of multiple same name variables with different values.

1 comment
Why not put the variable inside a StringValue which all the local script can access?