I know there’s a way to do this, I just forgot the name of it. How can I have multiple duplicates of a script but change one and it changes all of the duplicates?
For example, if I had a kill script and 50 kill bricks with 50 different kill scripts. (I know I could just use 1 script for it, but say I needed to use all 50 scripts) How would I change 1 script and it changes the rest
1 | for _,v in pairs (PlacewhereScriptsAre:GetChildren()) do |
2 | v:Destroy() |
3 | end |
4 | for i = 1 , HowManyScriptsYouWant do |
5 | local Script = script:Clone() |
6 | Script.Parent = PlacewhereScriptsAre |
7 | end |
8 | --there might be an easier way but idk it |
Its called a Linked Source to make a linked source make sure your game is published
Next make the script you want
then right click it and save as a linked source
name the source
now it is an asset under the scripts section in your game explorer
now you can have multiple scripts, but have one script edit all of them
You can use Module script for functions that you’ll use in multiple scripts