Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to change players torso rotation or something? lol

Quick question. I made this very simple script that basically teleports you using a GUI button, but it always teleports you facing 1 direction

script.Parent.MouseButton1Click:Connect(function()	

game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(58.918, 11.466, 30.89)

script.Parent:Destroy()
end)

Is there a way to change that? For example, when you teleport to the position you are facing forward but I want to make it so you are facing backward. Hope you understood me.

3 comments

0

Do you want the character or the camera to face in the opposite direction after teleporting?

0

Character

1

Don't change the torso change the HumanoidRootPart

1 answer

✓ Accepted answer

Does this work out for you?

script.Parent.MouseButton1Click:Connect(function()  

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(58.918, 11.466, 30.89) * CFrame.Angles(0,math.rad(180),0)
script.Parent:Destroy()
end)

2 comments

0

It didnt

0

This one should hopefully work. I use HumanoidRootPart to set the position & rotation as I've heard that it's preferable & works for both r6 & r15 rigs.

This discussion is preserved as it was. New answers, comments, and votes are closed.