My fall damage script doesn’t seem to register whenever player falls down from a height whilst ragdolled.
Snippet of ragdoll function, I do not change the humanoid state type.
local c = Hum.Parent
Humanoid.HipHeight = 0
Humanoid.PlatformStand = true
c.Humanoid.BreakJointsOnDeath = false
--Reset is BallSocket and Motor6Ds magic
Humanoid.FreeFalling:Connect(function(__NEWTSTATE)
if __NEWTSTATE then
__FT.Value = 0
playerheight = __HRP.Position.Y
else
__FT.Value = 0
local fallhght: number? = playerheight - __HRP.Position.Y
if fallhght >= __max and Humanoid.Health >= 0 then
pcall(function()
if not Character:FindFirstChild("DontFall") and not Character:FindFirstChildOfClass("ForceField") then
whooaaaa(Character,fallhght,fallhght,fallhght)
Humanoid:TakeDamage(999)
end
end)
elseif fallhght >= __min and Humanoid.Health >= 0 then
pcall(function()
if not Character:FindFirstChild("DontFall") then
Humanoid:TakeDamage(math.ceil(fallhght) + math.clamp(fallhght,10,15))
end
end)
end
end
end)