-- Landing

local canLand = false

local landingSound = Instance.new("Sound")
landingSound.SoundId = "rbxassetid://" .. stompSoundID
landingSound.Name = "LandingSound"
landingSound.PlaybackSpeed = 0.75
landingSound.Volume = 0.85
landingSound.Parent = head

humanoid.StateChanged:Connect(function()
	local state = humanoid:GetState()
	if (state == Enum.HumanoidStateType.Jumping or state == Enum.HumanoidStateType.Freefall) and canLand == false then
		canLand = true
	elseif state == Enum.HumanoidStateType.Landed and canLand == true then
		if landingSound and landingSound.IsLoaded then
			landingSound:Play()
		end
		defaultSound.TimePosition = 0
		canLand = false
	end
end)
