An approach to prevent replacing error messages and IDs (essentially addresses, like rbxassetid://) is to put all of your strings on a module, or a LocalizationTable and then refer to them by an error id or asset name.
I don’t see a functionality or use for this. I like to keep 1 local script and 1 module for the client and 1 script and 1 module for the server and I doubt anyone uses a crazy amount of scripts like 30 as you showed as an example (Not to mention that variables exist). This is also a feature in Roblox Studio, it is the replacement tool. I doubt there will be so much information to change to the point where you will need it. I don’t remember ever using it for as long as I remember developing. If anyone has hundreds of terms that they have to replace in hundreds of scripts in a daily basis then this is the module for them, but certainly not the case for most of the developers. I hope you create something more creative and useful in the future. Also a better UI design would make the use of the module easier, although it is totally understandable if you are not good at designing UIs. If I found a UI useful, the UI design wouldn’t be a problem to me.
I think this is a great plugin for beginners to programming that might have a lot of code smell where they repeat the same functions instead of creating one function that’s reusable. I think we’ve all been at that point where we didn’t even see how we could possibly go about that. (I was like that only a few month ago and started to get the hang of not making your code so smelly). Also, for a first UI I think it’s pretty good however I would suggest porting it into a plugin panel. (getting a little off track here) This is a lot better than I could’ve done when I created my first plugin. All in all it has a good use however, I would suggest fixing your code smells therfore you don’t need to even use a plugin like this in the first place.
I noticed that this will not replace anything if I have parenthesis anywhere in the text. (either that or it stops working after a certain amount of characters)
Besides that, it still works. Thanks so much for this useful plugin!
Select all scripts you need to replace terms in and run this in the commandbar
local termToReplace = "house"
local replaceWith = "House"
for _, s in ipairs(game.Selection:Get()) do
s.Source = s.Source:gsub(termToReplace, replaceWith)
end
Then you perhaps didn’t use it right; it’s valid lua.
One source of undesirable output could be that you didn’t have any occurrences to match, another that you tried executing it in a script object with insufficient permissions.
Thank you! This was an absolute lifesaver! If I didn’t find this, I would’ve just replaced 22 script-lines with what I wanted to, one by one. So yes, thank you very much