“These things I have spoken to you while being present with you. 26 But the Helper, the Holy Spirit, whom the Father will send in My name, He will teach you all things, and bring to your remembrance all things that I said to you. 27 Peace I leave with you, My peace I give to you; not as the world gives do I give to you. Let not your heart be troubled, neither let it be afraid. 28 You have heard Me say to you, ‘I am going away and coming back to you.’ If you loved Me, you would rejoice because I said, ‘I am going to the Father,’ for My Father is greater than I.
29 “And now I have told you before it comes, that when it does come to pass, you may believe. 30 I will no longer talk much with you, for the ruler of this world is coming, and he has nothing in Me. 31 But that the world may know that I love the Father, and as the Father gave Me commandment, so I do. Arise, let us go from here.” — John 14:25-31.
Jesus tells His disciples about His impending death and resurrection so that they may believe. He declares that because He loves the Father He is obedient to Him because His Father is greater than Him. [Jesus is talking of role as the Son of God.]