I'm trying to turn the character left instantly when pressed A and turned right instantly when pressed D. Everything except the turning left or right works. It does print out debug when keys pressed.
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local rootpart = char:WaitForChild('HumanoidRootPart')
local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
humanoid.AutoRotate = false
BodyGyro = Instance.new('BodyGyro')
BodyGyro.Name = 'Turning'
BodyGyro.Parent = rootpart
BodyGyro.P = 10000
BodyGyro.D = 1000
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.D then
print "debug"
BodyGyro.CFrame = CFrame.new(0,-90,0)
end
end)
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.A then
print "debug"
BodyGyro.CFrame = CFrame.new(0,90,0)
end
end)

2 comments
What script you use and where did you put it?
LocalScript and in StarterPack