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

Requesting assistance on this part color script?

Once again thank you for reading, I require assistance on this simple but not so seasoned script i made

wait(1)

local Handle = script.Parent
local torso = Handle.Parent.Parent:WaitForChild("UpperTorso")

Handle.BrickColor = torso.BodyColor

Technically, a person would have a certain torso color, then some accessories would be colored to match the torso bodycolor. This is placed in a script inside the accessory. The code does not work.

Thank you.

1 comment

0

Are you looking for when the tool is clicked, it will change color?

1 answer

✓ Accepted answer

BodyColor is not a real property under part. Just change it to:

wait(1)

local Handle = script.Parent
local torso = Handle.Parent.Parent:WaitForChild("UpperTorso")

Handle.BrickColor = torso.BrickColor

If you wanted to make the script work when the player equips the tool, do:

script.Parent.Parent.Equipped:Connect(function()
wait(1)

local Handle = script.Parent
local torso = Handle.Parent.Parent:WaitForChild("UpperTorso")

Handle.BrickColor = torso.BrickColor
end)

I was just assuming you were making a tool so yeah.

2 comments

0

i was actually not making a tool, but thanks for the new insight!

0

It said handle so I just assumed it was a tool lmao

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