If it is a normal script, like everyone else was saying, then you can't use LocalPlayer.
Instead, we have to check when a player was added to the game, and take player as a parameter. Also, I recommend changing "key == "e"" to string.lower(key) == "e" as if a player is holding Shift while pressing E, it will not work.
i.e:
01 | game.Players.PlayerAdded:connect( function (player) |
02 | local Mouse = player:GetMouse() |
04 | local Part = script.Parent |
06 | Part.BrickColor = BrickColor.new( "Medium stone grey" ) |
08 | Mouse.KeyDown:connect( function (key) |
09 | if Part.Touched and key = = "e" then |
10 | Part.BrickColor = BrickColor.new( "Black" ) |