I want the Part to change color to black when I touch it, and pressing E at the same time. But it doesn't work, why?
Mouse = game.Players.LocalPlayer:GetMouse()
local Part = script.Parent
Part.BrickColor = BrickColor.new("Medium stone grey")
Mouse.KeyDown:connect(function(key)
if Part.Touched and key == "e" then
Part.BrickColor = BrickColor.new("Black")
end
end)

5 comments
and yes, the part is the parent of the script
Local Scripts don't function in workspace.
its a normal script
Normal scripts can't have local properties such as a LocalPlayer.
^