local tool = script.Parent
local plr = tool.Parent.Parent
local char = plr.Character
local humanoid = char:WaitForChild("Humanoid")
local sound = tool.Handle.Sound
local db = false
local idle = humanoid:WaitForChild("Animator"):LoadAnimation(script.Idle)
local activate = humanoid:WaitForChild("Animator"):LoadAnimation(script.Activate)
local idle2 = humanoid:WaitForChild("Animator"):LoadAnimation(script.ActivateIdle)
local unequip = humanoid:WaitForChild("Animator"):LoadAnimation(script.Unequip)
tool.Equipped:Connect(function()
idle:Play()
end)
tool.Activated:Connect(function()
if db == false then
print("sounding")
db = true
idle:Stop()
print(idle.IsPlaying)
print("idle stopped")
activate:Play()
print("activate playing")
activate.Stopped:Wait()
print("activate finished")
sound:Play()
print("sound playing")
idle2:Play()
sound.Stopped:Wait()
print("finished")
idle2:Stop()
unequip:Play()
unequip.Stopped:Wait()
idle:Play()
db = false
end
end)
tool.Unequipped:Connect(function()
unequip:Play()
idle:Stop()
end)
For some reason, when I activate the script it only gets as far as Activate.Stopped:Wait() and does not go past that. I can’t think of whats causing the problem and im really stuck.