This one?
>When Grovyle and the player go back in time, Dialga sends his follower Dusknoir back in time as well to stop them. He is not seen up until Dusknoir drags the player and their partner back to the future, where Primal Dialga orders Dusknoir to eliminate them. He then assists his six Sableye in trying to stop the group from going back in time once more but fails due to the partner's quick thinking. Once the player and partner reach the summit of Temporal Tower, the present day Dialga attacks them, believing they've come to destroy the Tower due to being in the process of transforming into Primal Dialga. They manage to defeat him and save the tower, restoring time and Dialga to their normal states after which he thanks the player and their partner, grateful for all they've done. The future Primal Dialga, Grovyle, Dusknoir, and the player are all erased from existence due to being from a future which no longer exists but after the Temporal Tower incident, the present day Dialga returns the player to life as a show of gratitude for repairing the flow of time and the player's sacrifice, as well as the partner's sorrow at the loss of their friend.
Source