I am making coffee machines and i can get the first one to work but not the second mix help me please.

"Machine 1"

script.Parent.Touched:connect(function(h)
if (h.Parent.Name == "Cup (Empty)") then
script.Parent.Sound:Play()
h.Parent.Name = script.Parent.Parent.Config.Nme.Value
script.Parent.Transparency = 0
wait(0.5)
script.Parent.Transparency = 1
h.Parent.Drink.Transparency = 0
end
end)

I put the Config value to boiling water

"Machine 2"

script.Parent.Touched:connect(function(h)
if (h.Parent.Name == "Boiling Water") then
script.Parent.Sound:Play()
h.Parent.Name = script.Parent.Parent.Config.Nme.Value
script.Parent.Transparency = 0
wait(0.5)
script.Parent.Transparency = 1
h.Parent.Drink.Transparency = 0
end
end)

I put the config to mocha --This scond machine doesnt do anything that is the problem!!!!--

2 comments

0

is Config.Nme.Value the same value as the previous one?

0

yea