This script also works in a separate place, I'm just attempting to recreate the place for testing.
Upon the click of the button, an error that reads "attempted to index upvalue MyCharacter, which is a nil value" appears. The button has the localscript below and a brickcolor value. I think it's just a path error on my part or something, I'm not sure. Still newer to scripting. Thanks!
local MyCharacter = game.Players.LocalPlayer.Character
local x = script.Parent.PantColor.Value
script.Parent.MouseButton1Down:connect(function()
MyCharacter["LowerTorso"].BrickColor = x
MyCharacter["RightUpperLeg"].BrickColor = x
MyCharacter["RightLowerLeg"].BrickColor = x
MyCharacter["RightFoot"].BrickColor = x
MyCharacter["LeftUpperLeg"].BrickColor = x
MyCharacter["LeftLowerLeg"].BrickColor = x
MyCharacter["LeftFoot"].BrickColor = x
end)

1 comment
Ah, thank you. I still don't understand why things work in Studio but not in the actual game itself.