Cloning function multiplying

I’ve been heavily modifying and adding features to my FE Gun Kit.
I just noticed a bug that happens when I reload.

I made a code where the mag part clones and drops to the ground everytime I reload the gun.
However each time I do it, the mag multiplies.

Heres the code and video:

Video

Code
if ReloadAnim then ReloadAnim:Play(nil,nil,Module.ReloadAnimationSpeed)
			
	ReloadAnim:GetMarkerReachedSignal("O"):Connect(function()
		Handle.ClipOut:Play()
		if Module.MagDropsOnReload == true then -- the mag drop function
			local MagPart = Tool.Model:WaitForChild(Module.MagPartName)
			local MagClone = MagPart:Clone()
			MagClone.Parent = workspace
			MagClone:BreakJoints()
			MagClone.CanCollide = false
			wait(0.25)
			MagClone.CanCollide = true
			wait(Module.MagDropLifetime)
			MagClone:Destroy()
		end
	end)

If its multiplying that means the signals are stacking. Try using :Once() instead of :Connect()

2 Likes