I am trying to make a script that when a player hits a block it changes to the player team color but It doesnt work. Can somebody see it and try to help me?
TeamA = game.Workspace.TeamPaint.TeamA
TeamB = game.Workspace.TeamPaint.TeamB
Paint = script.Parent
script.Parent.Touched:connect(function()
script.Parent.BrickColor = Player.TeamColor
wait(0.2)
game.Workspace.TeamA = game.Workspace.TeamA + 1
Player.leaderboard.Paint.Value = Player.leaderboard.Paint.Value + 1
end)
