Why is my function not ending?

So basically I have a script with a function in it and it wont stop that function after running.
Why is this happening

				anim:GetMarkerReachedSignal('End attack'):Connect(function()
					-- add knockback
					effectsModule.KnockBack(Hitroot,char,mod.AttackDetails.forwardAttack.knockback,mod.AttackDetails.forwardAttack.direction)
					print('Attack over')
					
					return
				end)

Shouldnt this make it stop running

All the return does is stop the function that was fired by the Event, not the Event Itself, in order to stop the Event, you Disconnect it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.