Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to change players torso rotation or something? lol

Asked by 4 years ago

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.

0
Do you want the character or the camera to face in the opposite direction after teleporting? noammao 294 — 4y
0
Character Vibesgus 35 — 4y
1
Don't change the torso change the HumanoidRootPart RealTinCan 217 — 4y

1 answer

Log in to vote
0
Answered by
noammao 294 Moderation Voter
4 years ago
Edited 4 years ago

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)
0
It didnt Vibesgus 35 — 4y
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. noammao 294 — 4y
Ad

Answer this question