GetMarkerReachedSignal problem please help

Please help getmarker reached signal broke for some reason i dont know why!

Character.Humanoid.Animator.AnimationPlayed:Connect(function(Track)
		Track:GetMarkerReachedSignal("Footstep"):Connect(function()
			if FootstepCooldown then return end
			local Raycast = workspace:Raycast(HumanoidRootPart.Position, Vector3.new(0,-3.5,0), RayParams)
			if Raycast and Raycast.Instance then
				FootstepCooldown = true
				local Folder = getSoundFromColor(Raycast.Instance.Color)
				local BaseFootstep = soundMappings.base:GetChildren()[math.random(1, #soundMappings.base:GetChildren())]:Clone()
				BaseFootstep.Parent = HumanoidRootPart
				BaseFootstep:Play()
				Debris:AddItem(BaseFootstep, 2)
				local NormalFootstep = Folder:GetChildren()[math.random(1, #Folder:GetChildren())]:Clone()
				NormalFootstep.Parent = HumanoidRootPart
				NormalFootstep:Play()
				Debris:AddItem(NormalFootstep, 2)
				FootstepCooldown = false
			end
		end)
	end)

This piece of code should work as a footstep sound system.
BUT FOR SOME REASON IT DOES THIS:
изображение
but on other place with the same system it works perfectrly fine i tried switching to for … do loop but it didnt help :sob:
I am stuck with this for half an hour
(Yes I checked animation events were perfectly fine and I did play the animation properly)

Ah yes it multiplies the effect everytime it plays this anim even tho the same code on other place with the same code to play anim doesnt do this ****

I am gonna kms oh my lord graciouis meows :sob:

i am done *****NG DONE I CANT FIND SOLUTION TO THIS PROBLEM!

It seems it works like it’s intended? you never cache a sound instance, you just keep inserting a new one, so obvious that every step you are going to get a new sound in your RootPart

Found the issue and fixed it :smiley:

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