I made a cup recently, and have a script to animate it. So far, when I activate the cup, the sound for it plays, but nothing else happens. I have an idle animation(which is looped), and a drinking animation. I don't know what is wrong with the script. Note: The Drink and idle animations are stored in the local script(which is the script this code is in)
local canDrink = true script.Parent.Equipped:Connect(function() local DrinkAnim = script.Parent.Parent.Humanoid:LoadAnimation(script.Drinking) local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) idle:Play() end) script.Parent.Activated:Connect(function() if canDrink = true then canDrink = false local DrinkAnim = script.Parent.Parent.Humanoid:LoadAnimation(script.Drinking) local sound = script.Parent.Handle.Drink local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) idle:Stop() DrinkAnim:Play() sound:Play() wait(1.5) idle:Play() canDrink = true end end)