Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Camouflage script help?

This is very simple, and I have NO CLUE why it doesn't work.

script.Parent.Touched:connect(function(touch)
	script.Parent.Color = Color3.new(touch.Color)
end)

These are inserted into both of the legs of the player when they joins, and I have tested it, they do get inserted correctly. Please help? Thanks!

2 answers

✓ Accepted answer

Parts do not have a Color property. They have a BrickColor property.

You just need to change Color to BrickColor

script.Parent.Touched:connect(function(Touch)
    script.Parent.BrickColor = BrickColor.new(Touch.BrickColor.Color)
end)

EDIT: I didn't capitalize Touch on line 2

2 comments

0

Unfortunately, @XXahraternotXX Workspace.Player.Right Leg.Script:2: bad argument #1 to 'new' (Color3 expected, got BrickColor)

0

Here try that. I updated

M8, Touch.BrickColor.Color gives you the Color3 or a certain brick color.

Just keep the script...

script.Parent.Touched:connect(function(Touch)
    script.Parent.BrickColor = BrickColor.new(Touch.BrickColor)
end)

... and you should be fine. .3.

This discussion is preserved as it was. New answers, comments, and votes are closed.