Is there a way to remove the time it takes for a player to turn around? For my purposes I need for them to instantly turn around. I've thought about using BodyGyros, but I've never used that before so I'm not entirely sure how to go about it.
✓ ANSWER ACCEPTED
Is there a way to remove player turn time?
1 answer
✓ Accepted answer
You could set the CFrame of the player's HumanoidRootPart on a key press. An example implementation could be the following. Note that this does not include diagonal angles, but it should be fairly easy to implement.
-- assuming this is a localscript inside the player's character
local RootPart = script.Parent.HumanoidRootPart
game:GetService("UserInputService").InputBegan:connect(function(Input, Event)
if not game:GetService("UserInputService"):GetFocusedTextBox() then
local Angles = CFrame.new(Vector3.new(), workspace.CurrentCamera.CFrame.lookVector * Vector3.new(1, 0, 1))
if Input.KeyCode == Enum.KeyCode.W then
RootPart.CFrame = CFrame.new(RootPart.CFrame.p) * Angles
elseif Input.KeyCode == Enum.KeyCode.S then
RootPart.CFrame = CFrame.new(RootPart.CFrame.p) * Angles * CFrame.Angles(0, math.pi, 0)
elseif Input.KeyCode == Enum.KeyCode.A then
RootPart.CFrame = CFrame.new(RootPart.CFrame.p) * Angles * CFrame.Angles(0, math.pi / 2, 0)
elseif Input.KeyCode == Enum.KeyCode.D then
RootPart.CFrame = CFrame.new(RootPart.CFrame.p) * Angles * CFrame.Angles(0, -math.pi / 2, 0)
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Wow works like a charm! Thank you so much!