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
I am stuck with this for half an hour
(Yes I checked animation events were perfectly fine and I did play the animation properly)