Is there any way to rotate a player?

So, i’ve been trying to rotate a player, I got to set its angle and its pos but what I want to do is that the player is lying on the floor, I think it’s not possible to do so, but I just wanted to check if you can or if I’ll have to create a ragdoll and simulate that it’s the player (which is way more complicated), I tried doing several “rotate” functions I found on the wiki, but instead or they didn’t work for players or they didn’t rotate the player, but rather its view/camera. Also , I tried to create a ragdoll, but then I used the “SafeRemoveEntity(v)” and it totally crashed the game and I got tons of lua errors inside the actual code of gmod (not my lua script) BTW: I’m doing this on an entity, so that when you use it you lie down on it.

EDIT: I’ll do it with the ragdoll for the moment. But still, if there is an easier way to do this, please tell me.

function ENT:Use(c , a)
	if ragdolled == 0 then
		ragdolled = 1
		entPos = self:GetPos()
		tehAyTrays = c:GetEyeTrace().Entity
		if c:IsValid() and c:IsPlayer() then
			c:SetPos(entPos + Vector(0,0,0))
			angles = Angle(-89.000000,-179.794235,0.000000)
			//Here I want the rotate code and I tried many things but Idk how to do it
			ragdolled = 0