I made a new group and I am trying to mass replace all text label instances of the old group name with new group name in the game.
Ctrl+Shift+H is your best bet.
You can try running this in the command bar:
local NEW_GROUP_NAME = "Group"
local OLD_GROUP_NAME = "OldGroup"
for _, label in next, game.StarterGui:GetDescendants() do
if label:IsA("TextLabel") or label:IsA("TextButton") then
if label.Text == OLD_GROUP_NAME then
label.Text = NEW_GROUP_NAME
end
end
end
Of course, you’d need to change OLD_GROUP_NAME
and NEW_GROUP_NAME
accordingly to the previous group’s name and the new group’s name respectively. Be aware that is case-sensitive
1 Like
copy and paste this in the command bar
for _, object in pairs(game.StarterGui:GetDescendants()) do
if object:IsA("TextLabel") or object:IsA("TextButton") or object:IsA("TextBox") then
object.Text = object.Text:gsub("OLD GROUP NAME", "NEW GROUP NAME")
end
if object:IsA("TextBox") then
object.PlaceholderText = object.PlaceholderText:gsub("OLD GROUP NAME", "NEW GROUP NAME")
end
end
if you have any guis in other areas do the same but instead of game.StarterGui
put the path to the area where you store it
2 Likes
Thank you all for your help !
2 Likes