Are you sure he didn't say "I'm going to go take a piss"? That would mean he is going to urinate. If it was definitely "take the piss", we would need to know what happens next to see what he does which could be construed as taking the piss.
Note that "piss" is relatively rude/offensive for many people.
Student or Learner