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
01 | player = game.Players.LocalPlayer |
02 |
03 | scrGui = Instance.new( "ScreenGui" , player.PlayerGui) |
04 |
05 | for 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 = UDim 2. new( 0 , 20 , 0 , 20 ) |
12 | clrButton.Position = UDim 2. new( 0 ,(math.floor(i/ 12 ))* 22 , 0 ,(i)* 22 ) |
13 | clrButton.BackgroundColor 3 = clr.Color |
14 |
15 | clrButton.MouseButton 1 Click:connect( function () |
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)
1 | for i,v in pairs (colors:GetChildren()) do --replace colors with the path |
2 | v.MouseButton 1 Down: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 ) |
9 | end |