generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Head Movement

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
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
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
06 Jan 2015 05:35 PM
bump
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
06 Jan 2015 06:40 PM
bump...
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Jan 2015 04:31 AM
anyone? -_-
Report Abuse
udayk8139 is not online. 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
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Jan 2015 07:46 AM
lol please read?
but thnx for the bump though
Report Abuse
warriorqaz is not online. warriorqaz
Joined: 09 Oct 2009
Total Posts: 726
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 is not online. 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
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
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
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Jan 2015 09:25 AM
so no Solutions??? :/
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image