This script is the child of a Frame. The script is supposed to match the background color of the Frame to the Player's torso. But when I run this script, the color always returns black, even if the torso's color is red, white, green, or any other color. How can I fix this?
while true do wait() script.Parent.BackgroundColor3 = Color3.new(script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character["Body Colors"].TorsoColor) end
It returns black and probably returns na error aswell because you're trying to set a BrickColor value to a Color3 value, try this:
script.Parent.BackgroundColor3 = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character["Body Colors"].TorsoColor.Color --added the ".Color" to transform the BrickColor into a Color3 value, there's no need for the Color3.new() here
You don't need the loop, you only have to set the value once. Hope I helped! Good luck!