Weird issue with gun reloading

I’m trying to make my gun reload, but for some reason values change, not as they are supposed to though.
Video of my issue:

robloxapp-20210430-2128034.wmv (927.3 KB)

Code:

script.Parent.Reload.OnServerEvent:Connect(function(player)
	local currentammo = script.Parent.GunInfo.Ammo
	if currentammo.Value < 10 then
		local ammotofill = 10 - currentammo.Value
		if script.Parent.GunInfo.Mag.Value == ammotofill and script.Parent.GunInfo.Mag.Value > 0 or script.Parent.GunInfo.Mag.Value > ammotofill and script.Parent.GunInfo.Mag.Value > 0 then
			local track = player.Character.Humanoid.Animator:LoadAnimation(script.Parent.Client.Reload)
			track:Play()
			track:GetMarkerReachedSignal("Reload"):Connect(function()
				currentammo.Value = currentammo.Value + ammotofill
				script.Parent.GunInfo.Mag.Value = script.Parent.GunInfo.Mag.Value - ammotofill
			end)
		end
	end
end)

I can’t figure out what is wrong here, everything looks alright

It might be possible that it’s firing twice, be it that the remote is firing twice or there are 2 reload markers.

Try:

script.Parent.Reload.OnServerEvent:Connect(function(player)
    print("Reload Event Server")
	local currentammo = script.Parent.GunInfo.Ammo

and:

track:GetMarkerReachedSignal("Reload"):Connect(function()
				print("Animation Reload Signal",currentammo.Value,ammotofill)
				currentammo.Value = currentammo.Value + ammotofill
				script.Parent.GunInfo.Mag.Value = script.Parent.GunInfo.Mag.Value - ammotofill
			end)

Oh yeah, it does fire twice. Adding a reload debounce does not help though. I’m pretty sure there’s only one marker in the animation, so most likely the remote. Figured it out, I forgot deleting an input began event and left two, that’s why it was firing twice