Why this error keeps happening? Maximum event re-entrancy depth
When i was scripting a knife for my murder game,i ve got both these errors:
Maximum event re-entrancy depth exceeded for Tool.Equipped
While entering function defined in script 'Players.Player1.Backpack.Default Knife.Script', line 34
And i don't know what to do. Here is my complete Tool.Equipped event
01 | tool.Equipped:connect( function () |
02 | h = tool.Parent.Humanoid |
03 | local sound = Instance.new( 'Sound' ,tool) |
07 | mouseDownCon = mouseDown.OnServerEvent:connect( function () |
10 | local anim = Instance.new( 'Animation' ,tool) |
11 | anim.AnimationId = 'rbxassetid://' ..animations.stabs [ math.random( 1 , 3 ) ] |
12 | animTrack = h:LoadAnimation(anim) |
13 | animTrack.Priority = Enum.AnimationPriority.Action |
15 | local sound = Instance.new( 'Sound' ,tool) |
16 | sound.SoundId = 'rbxassetid://' ..sounds.striking [ math.random( 1 , 4 ) ] |