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

Is there a way to find and replace scripts?

Asked by 4 years ago

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.

0
use an I,v in pairs loop to change them all for you Only takes 1 script. DarkDanny04 407 — 4y
0
I'll try to see how to do that, thanks PixelatedCube64 28 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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")
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 :) PixelatedCube64 28 — 4y
0
Np. If you don't understand the code above, I suggest you watch AlvinBlox. He has great scripting videos. JailBreaker_13 350 — 4y
Ad

Answer this question