When I tried to rotate the players character, it just kills the player.
script.Parent.Touched:Connect(function(hit) for i,v in pairs(hit:GetChildren()) do if v:IsA("Humanoid") or v:IsA("CharacterMesh") or v:IsA("Accessory") then else v.Orientation = Vector3.new(0, -90, 0) end end)
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent:SetPrimaryPartCFrame(hit.Parent:GetPrimaryPartCFrame()*CFrame.Angles(0,math.rad(10),0)) end end)
The outcome you are getting (player dies) is because you are rotating all the parts individually which breaks their joints. You would need to rotate them all relative to one part.
script.Parent.Touched:connect(function(hit) local h = hit.Parent:FindFirstChild('Humanoid') if h then h.Parent:SetPrimaryPartCFrame(h.Parent.PrimaryPart.CFrame*CFrame.Angles(0,math.rad(-90),0)) end end)
This should work. If it does not, research the SetPrimaryPartCFrame() function. Do not rely on SetPrimaryPartCFrame() in the future as it slowly will distort the model you are positioning.