Okay so I am working on a game that includes one place I use as a menu and multiple other places that can be teleported to through my main place (the menu). All these various places people can teleport too all have the exact same UI, but since there is so many places each time I update one place's UI I have to update all the other places as well (manually) and it becomes a pain. Is there a way through which I can have one place set aside that contains all my UI and that that UI is transfered to the place the person teleports too when he or she does so. Is this possible through perhaps datastore or something? It would make things way more easier.
NOTE: This is basically an explanation and example of what M39a9am3R said.
ModuleScript
s are a pretty useful tool, especially when it comes to one script controlling things in multiple places.
They can be uploaded to ROBLOX, then required using their ID.
Here is a quick guide on using it:
1: CREATION
Create your ModuleScript
.
Name it 'MainModule', and parent it in ServerStorage
, or it won't work.
Then, get it's ID (it can be found in the url, for example: http://www.roblox.com/item.aspx?id=12345678
).
2: IMPLEMENTATION
Now, you simply have to require()
it in a script, using it's ID, for example:
local module = require(12345678)
Now, the rest is easy. Uploaded ModuleScript
s can store GUIs, and other scripts, so you won't have a problem with that.
Hope I helped! If you need anything, please just ask.
~TDP