I’m working on this drink code that when the player holds the drink and touches this part the name of the cup should change and the Part inside the Cup (drinkshould be visible and change color
The codes not working as if the part isn’t detecting the Cup tool
I’ve tried rewriting, changing the part, make it have a click detector but nothing.
(I’ve switched it back to touch)
heres a copy of my code:
script.Parent.Touched:Connect(function(part)
if part.Parent.Name == "Cup" then
part.Parent.Name = "Sparkle drink"
for i, v in pairs(part.Parent:GetChildren()) do
if v.Name == "Cup Colour" then
v.BrickColor = BrickColor.new("Medium blue")
v.Transparency = 0
end
end
end
end)