|
| 09 Jul 2015 04:38 AM |
How would I do when you press A the characters torso goes to -90 Y and when you press D the torso goes to 90 Y. I set auto-rotate to false on the players humanoid.
But I don't want to increment 90 or -90, I want it to be set specifically to 90 and -90
BTW when I said 90 Y and -90 Y I mean cframe |
|
|
| Report Abuse |
|
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 09 Jul 2015 06:53 AM |
use a local script, then
when key 'A' is pressed: local full = 2*math.pi character.Torso.CFrame = CFrame.new(character.Torso.Position) * CFrame.Angles(0,full/4,0) -- where full/4 = 360/4 = 90 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 07:49 AM |
bump
can I have the whole script? sorry but I have ugly code when it comes to pressing a key :\ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
Joeypm1
|
  |
| Joined: 25 Jul 2010 |
| Total Posts: 49 |
|
|
| 10 Jul 2015 12:46 AM |
m = game.Players.LocalPlayer m.KeyDown:connect(function(key) if key == "a" then --code with A key end if key == "d" then --code with d key end end)
^ i think that is how it works |
|
|
| Report Abuse |
|
|