I want the tool to play an animation once clicked, help?
local Tool = script.Parent;
enabled = true
function onActivated(player)
if not enabled then
return
end
enabled = false
local animation = player:FindFirstChild("Humanoid")
local rawr = Tool:FindFirstChild("DrinkAnimation")
animation:LoadAnimation(rawr)
Tool.Handle.DrinkSound:Play()
enabled = true
end
function onEquipped()
print("Equipped")
end
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
error: attempt to index local 'player' (a nil value) any way to make this work?

3 comments
attempt to index local 'animation' (a nil value)
Seriously? I provided you with the fixes to your code. You should have taken them and put them into your code.
I did