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

Camouflage script help?

Asked by 9 years ago

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

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
9 years ago

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

0
Unfortunately, @XXahraternotXX Workspace.Player.Right Leg.Script:2: bad argument #1 to 'new' (Color3 expected, got BrickColor) feeliirie 5 — 9y
0
Here try that. I updated Im_Kritz 334 — 9y
Ad
Log in to vote
0
Answered by
neff111 20
9 years ago

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.

Answer this question