0% found this document useful (0 votes)
8 views2 pages

Car Color Module for Roblox Models

The document defines a Lua module named CarColor that contains a list of car colors and functions to assign random or specific colors to car models. It includes functions to set the color of various parts of the car, ensuring certain elements are consistently colored gray while others can be randomized or set to a specific color. The module is designed for use in a game development context, likely within the Roblox platform.

Uploaded by

sharollsantana29
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Car Color Module for Roblox Models

The document defines a Lua module named CarColor that contains a list of car colors and functions to assign random or specific colors to car models. It includes functions to set the color of various parts of the car, ensuring certain elements are consistently colored gray while others can be randomized or set to a specific color. The module is designed for use in a game development context, likely within the Roblox platform.

Uploaded by

sharollsantana29
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

`local CarColor = {} -- Module Script

[Link] = {
[Link](255, 0, 0), -- Rojo
[Link](0, 255, 0), -- Verde
[Link](0, 0, 255), -- Azul
[Link](255, 255, 0), -- Amarillo
[Link](255, 0, 255), -- Magenta
[Link](0, 255, 255), -- Cian
[Link](255, 128, 0), -- Naranja
[Link](128, 0, 255) -- Púrpura
};

function [Link](obj:Model) -- Funcion para asignar un color random a


un carro
local randomcolor = [Link](1, #[Link])
local color = [Link][randomcolor]

print("Asignandole Color al Carro: ".. [Link])

[Link] = color
obj._nomad_unskew["Cylinder 3"].Color = color

obj["Carro bajo 1"].Color = [Link](64, 64, 64) -- Gris

[Link] = [Link](64, 64, 64) -- Gris


[Link]["Maniguetas 1"].Color = [Link](64, 64, 64) -- Gris
obj["Parachoqque atras"].Color = [Link](64, 64, 64) -- Gris

obj["Luces 2"].Color = [Link](255, 128, 0);


obj["Luces 2"]["Luces 3"].Color = [Link](255, 128, 0);

obj["Luces"].Color = [Link](255, 128, 0);


obj["Luces"]["Luces 1"].Color = [Link](255, 128, 0);

obj["Delante racks"].Color = [Link](64, 64, 64) -- Gris


obj["Delante racks"]["Delante racks 1"].Color = [Link](64, 64, 64) --
Gris
obj["Delante racks"]["Delante racks 2"].Color = [Link](64, 64, 64) --
Gris

[Link] = [Link](26, 26, 26)

end

function [Link](obj:Model, color:Color3) -- Funcion para asignarle un


color especifico a un modelo de carro

print("Asignandole Color al Carro: ".. [Link])

[Link] = color
obj._nomad_unskew["Cylinder 3"].Color = color

obj["Carro bajo 1"].Color = [Link](64, 64, 64) -- Gris


[Link] = [Link](64, 64, 64) -- Gris
[Link]["Maniguetas 1"].Color = [Link](64, 64, 64) -- Gris
obj["Parachoqque atras"].Color = [Link](64, 64, 64) -- Gris

obj["Luces 2"].Color = [Link](255, 128, 0);


obj["Luces 2"]["Luces 3"].Color = [Link](255, 128, 0);

obj["Luces"].Color = [Link](255, 128, 0);


obj["Luces"]["Luces 1"].Color = [Link](255, 128, 0);

obj["Delante racks"].Color = [Link](64, 64, 64) -- Gris


obj["Delante racks"]["Delante racks 1"].Color = [Link](64, 64, 64) --
Gris
obj["Delante racks"]["Delante racks 2"].Color = [Link](64, 64, 64) --
Gris

[Link] = [Link](26, 26, 26)

end

return CarColor`

You might also like