how could I make a GUI that changes the players color when selecting a color from the gui? and on a specific body part too? like HEX for example.
I'm not that good with GUI's
(This was not ment to be a request.)
Thanks, KIHeros
how could I make a GUI that changes the players color when selecting a color from the gui? and on a specific body part too? like HEX for example.
I'm not that good with GUI's
(This was not ment to be a request.)
Thanks, KIHeros
This was requested through chat and I offered help.
Put this in a LocalScript
player = game.Players.LocalPlayer
scrGui = Instance.new("ScreenGui", player.PlayerGui)
for i = 0,127 do
local clrButton = Instance.new("TextButton",scrGui)
local clr = BrickColor.palette(i)
clrButton.Name = tostring(clr)
clrButton.Text = ''
clrButton.Size = UDim2.new(0,20,0,20)
clrButton.Position = UDim2.new(0,(math.floor(i/12))*22,0,(i)*22)
clrButton.BackgroundColor3 = clr.Color
clrButton.MouseButton1Click:connect(function()
if player and player.Character then
for _,v in pairs(player.Character:GetChildren()) do
if v:IsA("Part") then
v.BrickColor = clr
elseif v:IsA("Model") then
for _,v1 in pairs(v:GetChildren()) do
if v1:IsA("Part") then
v1.BrickColor = clr
end
end
end
end
end
end)
end
Alright again, Not a request site ya bish, But I've done this before so I'ma spread my knowlage.
Pretty much, what you're going to want is buttons named to the brick name you want (Use _'s for spaces, we can gsub them out)
Now unlike what luke said, you can just have a simple script to control them all (it being local)
for i,v in pairs (colors:GetChildren()) do --replace colors with the path
v.MouseButton1Down:connect(function()
localcolor= string.gsub(v.Name,"_"," ")
for k,l in pairs (game.Players.LocalPlayer.Character:GetChildren()) do
if l:IsA("Part") then
l.BrickColor = BrickColor.new(name)
end
end)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.