-- 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.Volume = 0.1
		footstepsSound.Parent = rootPart
		timer = (humanoid.WalkSpeed/16) * 2.25
		print(timer)
	end
end)
