This script is in a "VehicleSeat" and is supposed to rotate the model when the person pressed A or D. Here's the two scripts. This is Control
angle = 0 while true do wait() if script.Parent.Steer == 1 and angle < 10 then script.Parent.Swiv:play() angle = angle + 1 script.Parent.Parent.WER.Value.C0 = script.Parent.Parent.WER.Value.C0 * CFrame.fromEulerAnglesXYZ(0,0.01,0) elseif script.Parent.Steer == -1 and angle > -10 then script.Parent.Swiv:play() angle = angle - 1 script.Parent.Parent.WER.Value.C0 = script.Parent.Parent.WER.Value.C0 * CFrame.fromEulerAnglesXYZ(0,-0.01,0) end end
and this is Control2
angle = 0 while true do wait() if script.Parent.Throttle == 1 and angle < 25 then script.Parent.Swiv:play() angle = angle + 1 script.Parent.Parent.WER2.Value.C0 = script.Parent.Parent.WER2.Value.C0 * CFrame.fromEulerAnglesXYZ(-0.01,0,0) elseif script.Parent.Throttle == -1 and angle > -5 then script.Parent.Swiv:play() angle = angle - 1 script.Parent.Parent.WER2.Value.C0 = script.Parent.Parent.WER2.Value.C0 * CFrame.fromEulerAnglesXYZ(0.01,0,0) end end
You didn't use onKeyDown() to tell which key needs to be pressed to activate it.