The script is supposed to rename the tool and edit its attributes if certain attributes are enabled or have certain values, but its not doing that at all.
Cup = script.Parent
local Flavor = script.Parent:GetAttribute("FlavorName")
local DrinkName = script.Parent:GetAttribute("DrinkName")
local DrinkType = script.Parent:GetAttribute("DrinkType")
local DairyType = script.Parent:GetAttribute("DairyType")
local function Americano()
if DrinkType == "Coffee"
and DrinkName == "Espresso"
and Cup:GetAttribute("has_water") == true
then
-- editing properties
Cup.Name = Flavor.."Americano"
Cup:SetAttribute("DrinkName", Cup.Name)
Cup:SetAttribute("DrinkType", "Americano")
end
end
script.Parent:GetAttributeChangedSignal("has_water"):Connect(Americano)