Best way to have the exact same script in two different places

So I have came across something quite annoying to do with “core” scripts for my game (camera bob scripts, etc).

When im making another place (could be more than you would expect) you would have to manually copy and paste these scripts to the other place and when you want to edit them you need to edit them all.

I have thought about packages as you can publish them and update them so then all i need to do is at least press the update button, I have also thought of using require and some modules in order to do this (easier way because I dont need to go to each place updating them) and finally making a model with the script inside and making it get the model then the script and move the script into place.

Please let me know on the best way to go about something like this. Thanks in advance!

1 Like

I would make a module and just use require() whenever I want to use it, then you only need to update that one module

I see, I was also thinking that too, I am going to let some more people share their opinions and see what “wins”. Thanks!

1 Like

This is awkward but do you know how to actually do this? (uploading modulescripts and requiring them) I am finding out and am very close so dont worry too much.

Never mind figured it!

character limit

1 Like