Advertisement
anphu04

Finobe Color Saving

Oct 27th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. -- THESE CODES SHOULD BE PUT INTO THE COMMAND BAR --
  2. -- FIRST STEP --
  3.  
  4. function scan(parent)
  5. for i,v in pairs(parent:GetChildren()) do
  6. if v:IsA("BasePart") then
  7. local val = Instance.new("StringValue")
  8. val.Name = "BrickColorName"
  9. val.Value = tostring(v.BrickColor)
  10. val.Parent = v
  11. end
  12. scan(v)
  13. end
  14. end
  15.  
  16. scan(workspace)
  17. scan(game.Lighting)
  18.  
  19. -- SECOND STEP --
  20.  
  21. function scan2(parent)
  22. for i,v in pairs(parent:GetChildren()) do
  23. local color = v:FindFirstChild("BrickColorName")
  24. if color ~= nil then
  25. v.BrickColor = BrickColor.new(color.Value)
  26. color:remove()
  27. end
  28. scan2(v)
  29. end
  30. end
  31.  
  32. scan2(workspace)
  33. scan2(game.Lighting)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement