when i walk onto a part material get the error (string expected, got boolean) and the mv.Value wont change thus breaking the rest of the script can i not change the stringvalue Value by touching a part material
script.Parent:WaitForChild("LeftFoot", "RightFoot").Touched:Connect(function(tuch) local mv = script.Material mv.Value = tuch.Material == Enum.Material --error occurs here
You must do Enum.Material.MaterialNameHere . When you type Enum.Material.
it will try and finish your sentence by giving you a short list of Material Enums. View more about Enums here.
Edit
script.Parent:WaitForChild("LeftFoot", "RightFoot").Touched:Connect(function(tuch) -- tuch is the thing it touches. local mv = script:WaitForChild("Material") mv.Value = tuch.Material -- tuch's material.