1 | script.Parent.MouseButton 1 Click:Connect( function () |
2 | game.Players.LocalPlayer.Character. [ "Right Arm" ] .BrickColor = BrickColor.new( "Black" ) |
3 | script.Parent.Parent.Parent.RIGHTARM.Text = "Black" |
4 | script.Parent.Parent.Parent.RIGHTARM.BackgroundColor 3 = Color 3. fromRGB( 27 , 42 , 53 ) |
5 | end ) |
a button that changes the right arm color, but it doesnt work because of the character, what is the problem?
Change Character.["Right Arm"].BrickColor
to Character["Right Arm"].BrickColor
, removing the dot
By using . you are signifying that you want to index something, but right after that you use [] signifying again that you want to index something. Lua doesn't like this, so it'll throw a syntax error.