Not able to rotate model by script

You should still use PivotTo, as SetPrimaryPartCFrame has some nasty offset issues, and PivotTo fixes that bug.
Edit:
Do you mean this code activates when you sit down or the code only triggers while you’re sitting down?