Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why this error keeps happening? Maximum event re-entrancy depth

Asked by 8 years ago

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

01tool.Equipped:connect(function()
02    h=tool.Parent.Humanoid
03    local sound=Instance.new('Sound',tool)
04    sound.SoundId='rbxassetid://'..sounds.equip
05    sound:Play()
06    sound:Destroy()
07    mouseDownCon=mouseDown.OnServerEvent:connect(function()
08        if not canKill then
09            canKill=true
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
14            animTrack:Play()
15            local sound=Instance.new('Sound',tool)
View all 25 lines...
0
Are you missing something? The error is on line 34, but there's only 25 lines TheHospitalDev 1134 — 8y
0
The tool.Equipped event starts at line 34 arthurgps2 67 — 8y

Answer this question