Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing player body color GUI?

Asked by
Hero_ic 502 Moderation Voter
9 years ago

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

2 answers

Log in to vote
4
Answered by 9 years ago

This was requested through chat and I offered help.

Put this in a LocalScript

01player = game.Players.LocalPlayer
02 
03scrGui = Instance.new("ScreenGui", player.PlayerGui)
04 
05for i = 0,127 do
06    local clrButton = Instance.new("TextButton",scrGui)
07 
08    local clr = BrickColor.palette(i)
09    clrButton.Name = tostring(clr)
10    clrButton.Text = ''
11    clrButton.Size = UDim2.new(0,20,0,20)
12    clrButton.Position = UDim2.new(0,(math.floor(i/12))*22,0,(i)*22)
13    clrButton.BackgroundColor3 = clr.Color
14 
15    clrButton.MouseButton1Click:connect(function()
View all 30 lines...
Ad
Log in to vote
-2
Answered by
NotSoNorm 777 Moderation Voter
9 years ago

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)

1for i,v in pairs (colors:GetChildren()) do --replace colors with the path
2    v.MouseButton1Down:connect(function()
3        localcolor= string.gsub(v.Name,"_"," ")
4        for k,l in pairs (game.Players.LocalPlayer.Character:GetChildren()) do
5            if l:IsA("Part") then
6                l.BrickColor = BrickColor.new(name)
7            end
8    end)
9end

Answer this question