Ultrasonic sensor With LCD combine with Servo

Hai Im working on a project that involves 3 components ultrasonic sensor, servo, and lcd display. I want to make the servo react to the ultrasonic sensor like a warning gauge and the lcd is to display the distance between an object and the ultrasonic sensor. I found separate coding for servo and lcd and when i try to combine the two only the servo is working the lcd only display Distance = 0 no reading. Please im hoping there is a solution for this. I barely know about coding this is my first time making arduino project.

Please im hoping there is a solution for this.

There most likely is. It would involve changing your code, which we can't see. So, you don't want us making suggestions as to what to change.

You need to post your for people to help, post it within the </> tags.

Rather than trying to stick other people's code together you are better to use them as examples, understand them and then write your own code.

If you are completely new to this then jumping in with a servo a sensor and an LCD display may be trying to go too far too fast.

I would start with really basic tutorials like blinking an LED.

Anyway if you are going to jump in at the deep end write your own code for the ultrasonic sensor. Use print statements to show what distance it is reading and get that working. Once that works add in the LCD display and show the distance on that. Finally add in the servo. Always have lots of print statements in your code so that you can 'see' and understand what it is doing.