Hello everyone, I’m trying to make an animation ff¡or a tool but id doesn’t work.
local tool = script.Parent
local anim = script.Parent:WaitForChild("Anim")
local debounce = false
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local thing = char.Humanoid:LoadAnimation(anim)
tool.Activated:Connect(function()
print("Tool was activated")
if debounce == false then
thing:Play()
debounce = true
wait(1)
debounce = false
end
end)