Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to find and replace scripts?

I made a bunch of lanterns that flicker in unison. However, I want to change the color and don't want to go through copy and pasting and deleting scripts again (I tried to save and it crashed without saving). Please, please tell me there is an easier way. Thanks for reading.

2 comments

0

use an I,v in pairs loop to change them all for you Only takes 1 script.

0

I'll try to see how to do that, thanks

1 answer

✓ Accepted answer

Sadly, there is not a way, but I would recommend to use one script that does it all. You can create a function and call it multiple times. You can even use the same function for different colors. Like this:

function color(PartName, Color)
local part = game.Workspace:FindFirstChild(PartName)

part.BrickColor = Color
end)

:color(ThisIsMyPartName, "Really Blue")

2 comments

0

I don't exactly get it, but thank you for saving me a few hours of googling how to find and replace! I'll do it the old fashioned way :)

0

Np. If you don't understand the code above, I suggest you watch AlvinBlox. He has great scripting videos.

This discussion is preserved as it was. New answers, comments, and votes are closed.