help I am trying to get the players viewport as a texture 2d

Correct. Does this work for you?