Hello there, I have a part that I want the material to be changed from plastic to neon upon contact with the part, and after one second, the material is changed back to plastic. Here's the script I used. The script is located in the part in the workspace.
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Material = "Neon"
wait(1.0)
hit.Material = "Material"
end
end)
Please help.

4 comments
Does it print an error
Yes, it did. Upon touching the part, I get the following error in the output log:
Is it supposed to change the hit's material or the bricks material
Do you want to change a color of a part, or a player? Because the "hit.Material" is in the common the leg of the player. If you want to change the material of a part, just add a variable like local Part = workspace.blahblah and change the hit to the variable name.