|
| 26 Jun 2013 02:22 PM |
so when im using a keydown weapon right now and one of the attacks im making requires me to set my torso's lookvector to where my mouse is pointing, can someone help me with this?
like....
game.Workspace.snowboarder199.Torso.CFrame.lookVector = mouse.Hit.p
i dont think thats quite all of it though :/
(i already have all the keydown and mouse functions setup im just looking for how to set the lookVector) |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 26 Jun 2013 02:24 PM |
game.Workspace.snowboarder199.Torso.CFrame = CFrame.new(game.Workspace.snowboarder199.Torso.Position, mouse.Hit.p)
This should work. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 02:24 PM |
CFrame.new(position,point)
returns a CFrame at 'position' facing 'point'
so like this:
game.Workspace.snowboarder199.Torso.CFrame=CFrame.new(game.Workspace.snowboarder199.Torso.CFrame.p,mouse.Hit.p) |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 02:27 PM |
| you guys rock, thanks so much :D |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
| |
|