How do i make a system that when clicking the player automatically rotates to fix an object [like in the video]

Use CFrame.lookAt()

You can use CFrame.new() or CFrame.lookAt() this way:

-- Assuming you are running the code on a localscript:
local Character = game:GetService('Players').LocalPlayer.Character
local Root = Character.HumanoidRootPart
local Object_to_Look = workspace.Part -- change this to whatever you want
Root.CFrame = CFrame.new(Root.Position, Object_to_Look.Position)