|
| 06 Jan 2015 04:35 PM |
local direction = (CFrame.new(head.Position, mouse.Hit.p)):toObjectSpace(char.Torso.CFrame * neck.C1).lookVector.Y neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(math.asin(direction), 0, 0)
it just seems to be stupid, all the things I've tried but wen I tried
local direction = (CFrame.new(head.Position, mouse.Hit.p)):toObjectSpace(char.Torso.CFrame * neck.C1) neck.C0 = CFrame.new(direction) --I just used the Variable cos I was editing my Script not making everything from Scratch
the Head moved all around the Place... but I really need it to go just up and down :/ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
udayk8139
|
  |
| Joined: 25 Aug 2013 |
| Total Posts: 622 |
|
|
| 07 Jan 2015 07:28 AM |
Use LookVector? ._. IDK, I am new to lua, Just a wild guess. ;D
Hope it helps.xD |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:46 AM |
lol please read? but thnx for the bump though |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 08:02 AM |
Here, this is a piece from one of my scripts that should do that:
local dir = (mouse.hit.p-torso.Position).unit local acosine = math.acos(dir.y) neck.C1 = CFrame.new(0,-0.5,0)*CFrame.Angles(acosine-math.pi/2,0,0) |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 07 Jan 2015 08:06 AM |
Run this every RenderStepped. You're making an fps script, right? K so run this every RenderStepped or it will look messed up. |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 08:25 AM |
warriorq, it's all the same as my Previous Attempts :/ dPKPUxK on img u r --sry about spaces, the Stupid Filer doesn't even let that Word through!
and Ruinable, wat u think am doin? tool.Equipped:connect(function() game:GetService('RunService').RenderStepped:connect(function() --My Code end) end) |
|
|
| Report Abuse |
|
|
| |
|