Problem with damage and Ragdoll

Hello, I have this script that allows to cause damage when we fall from a certain height, but I have another script that allows to Ragdoll the character, my question is, how to ensure that my damage script does not take not take into account the ragdoll? because when the ragdoll character he takes no damage.

local MaxVelocity = script:GetAttribute("MaxVelocity")
local MinVelocity = script:GetAttribute("MinVelocity")

game.Players.PlayerAdded:Connect(function(Plr)
	Plr.CharacterAdded:Connect(function(Char)
		local Humanoid = Char:WaitForChild("Humanoid")
		local HumanoidRootPart = Char:WaitForChild("HumanoidRootPart")

		Humanoid.StateChanged:Connect(function(OldState, NewState)
			local PlrVelocity = HumanoidRootPart.Velocity.Y
			PlrVelocity *= -1

			if PlrVelocity > MaxVelocity then
				Humanoid.Health = 0
			elseif PlrVelocity > MinVelocity then
				Humanoid.Health -= PlrVelocity / 15
			end
		end)
	end)
end)

add a attribute to the player that has the ragdoll value and just check if the player is ragdolled before applying the damage

I see what you’re talking about, but I’m a beginner in scripting and I don’t see how to do it… this is a script from someone who kindly put it in the resources.

can you provide the ragdoll script ill code it for you

there are several scripts that handle this :face_with_diagonal_mouth:, here is the model I use: