You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? So its need work like “1 usemouse 1 time and then animation work, but if animation work the usemouse = false but if animation:Stop UseMouse = true”
just like this
( I just dont have anyidea how its Edit in script)
If Animation:Play() == true then
Mouse.Button1Down = false
if Animation:Stop() == false then
Mouse.Button1Down = True
local debounce = false --to prevent clicking
local Cup = script.Parent
Cup.Activated:Connect(function() --when clicked, must be in a character
if debounce then return end --dont activate if debounce is true
debounce = true --make sure it cant be activated
local animation = Cup.Drink_Animation
local track = Cup.Parent.Humanoid.Animator:LoadAnimation(animation) --load the animation
track.Looped = false --make sure it isn't looped
track:Play() --play the animation
track.Stopped:Connect(function() --when animation is finished
debounce = false --release the debounce
end)
end)