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

Attempt at editing player body color VIA Script, it should work in theory but its not?

Asked by 10 years ago

color1 = 23 function color() script.Parent.Parent.Parent.Parent.Character["Body Colors"].LeftArmColor = new(color1) script.Parent.Parent.Parent.Parent.Character["Body Colors"].LeftLegColor = new(color1) script.Parent.Parent.Parent.Parent.Character["Body Colors"].RightArmColor = new(color1) script.Parent.Parent.Parent.Parent.Character["Body Colors"].RightLegColor = new(color1) script.Parent.Parent.Parent.Parent.Character["Body Colors"].TorsoColor = new(color1) script.Parent.Parent.Parent.Parent.Character["Body Colors"].HeadColor = new(color1) end

script.Parent.MouseButton1Down:connect(color)

1 answer

Log in to vote
0
Answered by
haillin 60
10 years ago

Here is a simple script to change the Color of your character's entire body.

local block=script.Parent
block.ClickDetector.MouseClick:connect(function(player)

local p=player.Character:GetChildren()

for i= 1,#p do

if p[i].ClassName=="Part" then


p[i].BrickColor=BrickColor.new("Bright green")  


end

end




end)

I made a button and I have that acting as the trigger, of course you can set it to a touched event as well.

Change bright green to whatever color you want.

0
I need it to work in a GUI script, its for a morph BearKranz 41 — 10y
Ad

Answer this question