I'm trying to make a part switch from smooth plastic yellow, and then back into it's original color and material. So far, converting back to the original material has worked perfectly fine. However, whenever I try to turn the part back to it's original color, it just sets it to pure black. Any idea to why is this happening and how I can fix this?
local Part = script.Parent
local material = Part.Material
local color = Part.Color
wait(1)
Part.Material = "SmoothPlastic"
Part.Color = Color3.fromRGB(255, 255, 0)
wait(1)
Part.Material = material
Part.Color = Color3.fromRGB(color)

3 comments
This worked thank you!
Can you mark my answer as the solution then? Please
Gotcha, albeit a bit late