I have a model called Regular Coffee Machine and the script works to make it regular coffee, but to make it more detailed, I want to add a spill. So I figured, I'd make a spill part, name it, "Spill2".. then make it Transparency 1. In the script, I made it so that it will turn to transparency 1 again. For some reason this won't work... Help?
Code:
script.Parent.Touched:connect(function(h)
if h.Parent.Name == "EmptySmallCoffeeCup" then
h.Parent.Name = "Small Regular Coffee"
h.Parent.Spill2.Transparency = 0
wait(.5)
h.Parent.Spill2.Transparency = 1
end
end)

4 comments
What does output say?
it says that Spill2 is not a valid number of Tool.. But I have it in the tool too.
Try using :WaitForChild() and make sure it's spelled right.
After the Spill goes to Transparency 1?