Hi,
I want to make the player turn instantly left and right instead of turning slowly. How would I do this?
Hi,
I want to make the player turn instantly left and right instead of turning slowly. How would I do this?
Same principle when dealing with translation, but you are specifying rotation instead.
CFrame calculates orientation using radians, pi is equivalent to 180 in degrees.
local Players = game:GetService("Players")
local Target = Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
repeat task.wait() until game:IsLoaded()
wait(3)
Target.CFrame = Target.CFrame * CFrame.Angles(0, math.pi / 2, 0)
Wrote this on phone, but it should work.
If you want to inverse this, just make pi a negative instead.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.