-- Function to handle player falling

local function handlePlayerFalling(player, floorPosition, previousPosition)
	local fallDistance = (floorPosition - previousPosition).Magnitude
	if fallDistance > MAX_FALL_DISTANCE then
		local damage = calculateFallDamage(fallDistance)

		-- Apply damage to the player
		-- Replace this line with your own code to apply damage to the player
		player.Character.Humanoid.Health = player.Character.Humanoid.Health - damage
	end
end
