For scripting i use c++ so i don't know anything about Lua.
Long story short i want to find out if i can reference another script in a script and how.
Scenario I am making an game which includes spawn points in the game. At the moment i have a leaderboard script set up within serverscriptservice and there is a variable named stage which is supposed to determine where you spawn. Supposedly, only way to change that variable is through contact with a spawnpoint block.
In order to do so i have to reference the script from elsewhere. And if there is a easier way to achieve this then that would be great to.
Thanks :)
From what I can understand reading your question, you would want to use a modulescript. Others may suggest using _G, however, I (along with many other people) will recommend against it due to various reasons which can be explained here. (BlueTaslem's answer.)
On second thought, you could actually just use your leaderboard script and not have to reference anything. Just loop through all the spawn points and if a player touches any of them, change the variable.