as always, the question sounds confusing but what i'm saying is that, how do I change the color of the part in the custom character (lets say like Torso for example when ever a player respawns it changes color). I'm trying to change up the hat color I've added on my custom character for player to play as. Each time they respawn, the hat changes colors but my scripting seems a bit off, and it's not working.
local Players = game:GetService("Players")
local function onCharacterAdded(character)
character.ShadowMaskGiver.Color.BrickColor.BrickColor = BrickColor.Random()
end```

3 comments
ignore the "```" part at the end, that isn't part of the script.
I found that adding wait(1) does the trick
that doesn't seem to work, What really bothers me is that nothing is showing in the output.