LoadAnimation:() suddenly has stopped working. Any answers?
so i have this knife weapon im working on yet the attack animation just stopped working, it worked before but it suddenly just started giving this error message:
Players.munkuush.Backpack.Knife.Script:25: attempt to index boolean with 'Play'
I am confused, anyways, heres my code:
01 | local player = script.Parent.Parent.Parent |
02 | local char = player.Character or player.CharacterAdded:Wait() |
03 | local hum = char:WaitForChild( "Humanoid" ) |
05 | local idle = hum:LoadAnimation(game.ReplicatedStorage.Knife_Idle) |
06 | local attack = hum:LoadAnimation(game.ReplicatedStorage.Knife_Attack) |
10 | script.Parent.Equipped:Connect( function () |
15 | script.Parent.Unequipped:Connect( function () |
20 | script.Parent.Activated:Connect( function () |
21 | if cooldown = = false then |
35 | script.Parent.Hitbox.Touched:Connect( function (hit) |
36 | local human = hit.Parent:WaitForChild( "Humanoid" ) |
37 | if human.Parent ~ = char then |
38 | if attack = = true then |