Advertisement
malvarsation

Retexture and Recoloring Script.

Jan 24th, 2015
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. function recolor(model, Color, recursion)
  2.     for _, Part in next, model:GetChildren() do
  3.         if Part:IsA("Part") then
  4.             Part.BrickColor = BrickColor.new(Color);
  5.         elseif Part:IsA("Model") and recursion then
  6.             recolor(Part, Color, recursion);
  7.         end;
  8.     end;
  9. end;
  10.  
  11. function retexture(model, Texture, recursion)
  12.     for _, Part in next, model:GetChildren() do
  13.         if Part:IsA("Part") then
  14.             Part.Material = Texture;
  15.         elseif Part:IsA("Model") and recursion then
  16.             retexture(Part, Texture, recursion);
  17.         end;
  18.     end;
  19. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement