:LoadCharacter and changing the direction of the character

This one is quite a simple one to explain, I’ve made a ‘Refresh’ button that when it is clicked it will reload the character into a new position (Essentially removing their clothes). However, when the refresh button is clicked it turns the new loaded character into (I believe North). What would be the solution to this as I can’t seem to change the direction of it. Below is the script that I have used.

refreshCharacter.OnServerEvent:Connect(function(player)
     local playerPosition = player.Character.HumanoidRootPart.Position
     player:LoadCharacter()
     player.Character.LowerTorso.CFrame = CFrame.new(playerPosition)
end)

Sorry if this was the incorrect format, tab button isn’t working very well

You should save the player’s CFrame instead of position so you keep maintain orientation.

refreshCharacter.OnServerEvent:Connect(function(player)
     local playerCFrame = player.Character.HumanoidRootPart.CFrame
     player:LoadCharacter()
     player.Character.HumanoidRootPart.CFrame = playerCFrame
end)