local s=function()local s=footstepModule:GetTableFromMaterial(humanoid.FloorMaterial)local P=footstepModule:GetRandomSound(s)return P end RunService.RenderStepped:Connect(function(P)if timer>0 then timer-=P end if timer<0 and check_movement()then footstepsSound.SoundId=s()footstepsSound.Parent=nil footstepsSound.Parent=rootPart timer=.5/((humanoid.WalkSpeed/16)*1.25)end end)
-- Get sound id
local get_material = function()
	local soundTable = footstepModule:GetTableFromMaterial(humanoid.FloorMaterial)
	local randomSound = footstepModule:GetRandomSound(soundTable)

	return randomSound
end

RunService.RenderStepped:Connect(function(delta)
	if timer > 0 then
		timer -= delta
	end
	if timer < 0 and check_movement() then
		footstepsSound.SoundId = get_material()
		footstepsSound.Parent = nil
		footstepsSound.Parent = rootPart
		timer = 0.5 / ((humanoid.WalkSpeed / 16) * 1.25)
	end
end)
