local Z=function()local Z=footstepModule:GetTableFromMaterial(humanoid.FloorMaterial)local x=footstepModule:GetRandomSound(Z)return x end RunService.RenderStepped:Connect(function(x)if timer>0 then timer-=x end if timer<0 and check_movement()then footstepsSound.SoundId=Z()footstepsSound.Parent=nil footstepsSound.Parent=rootPart timer=.5/((humanoid.WalkSpeed/16)*1.25)end end)

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)
