Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can i edit multiple scripts at once?

Asked by
cancle5 120
3 years ago

Hello, I'm a Roblox scripter and I was wondering if I could edit multiple scripts at once. I have a lot of scripts in different parts that are exactly the same and I want to edit 1 tinny thing but I don't want to go to every script and edit the same thing. It would be nice if there was any way I could do this.

3 answers

Log in to vote
0
Answered by
KixWater 126
3 years ago

What you could do is get the plugin named "Tag Editor" or something like that. Link to Plugin: https://web.roblox.com/library/948084095/Tag-Editor

AlvinBlox Video on How to use Collection Service: https://www.youtube.com/watch?v=-oPE0PL2Zew

What Collection Service does is that you can tag different objects to the plugin and you can edit the parts that you tagged in one script instead of going to multiple scripts and editing the same thing over and over again.

Hope this helped.

How to get Collection Service:

game:GetService("Collection Service")
Ad
Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
3 years ago

Yeah there is a way using command runner in the studio, in my studio it looks like this.

You can run any command in there, in your case checker that will loop through all the parts and if there is a script named ... then it will set it's .Source property to whatever you want.

The best option tho would be to prevent stuff like this by using loops, you can have one script and loop through all the parts and do same function without copying the script, i don't know what your parts do but for example if you want all parts to be red, you would do this

local Parts = workspace.Parts -- folder with parts or wherever they are

for Index, Part in ipairs(Parts:GetChildren())
do
    Part.Color = Color3.new(0, 0, 1)
end

In the do block you can do anything you want to the part. That way if i want to change the color i just change 0, 0, 1 to 0, 1, 0 and done. Index in this case refers to part position in the table that :GetChildren returns and Part is the part itself.

Log in to vote
0
Answered by 3 years ago

You can use module script to keep your scripts and local scripts organized, and also you can edit just from the one module script. Had you use Module scripts before starting to script you would just need to edit from the one module script and the changes will be applied to all the other scripts calling from it.

Answer this question