Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- THESE CODES SHOULD BE PUT INTO THE COMMAND BAR --
- -- FIRST STEP --
- function scan(parent)
- for i,v in pairs(parent:GetChildren()) do
- if v:IsA("BasePart") then
- local val = Instance.new("StringValue")
- val.Name = "BrickColorName"
- val.Value = tostring(v.BrickColor)
- val.Parent = v
- end
- scan(v)
- end
- end
- scan(workspace)
- scan(game.Lighting)
- -- SECOND STEP --
- function scan2(parent)
- for i,v in pairs(parent:GetChildren()) do
- local color = v:FindFirstChild("BrickColorName")
- if color ~= nil then
- v.BrickColor = BrickColor.new(color.Value)
- color:remove()
- end
- scan2(v)
- end
- end
- scan2(workspace)
- scan2(game.Lighting)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement