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
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do I apply lookVector?

Previous Thread :: Next Thread 
ash877 is not online. ash877
Joined: 18 Feb 2008
Total Posts: 5142
03 Apr 2015 09:28 PM
plr.Character.Torso.CFrame=CFrame.new(0,0,0)*workspace.Part.CFrame.lookVector

--Is this right?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Apr 2015 09:34 PM
No.

lookVector is just vector to which the object is facing. You can apply it many ways, but I don't know what you're doing.
Report Abuse
ash877 is not online. ash877
Joined: 18 Feb 2008
Total Posts: 5142
03 Apr 2015 09:35 PM
trying to get the character to face the direction of a part.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Apr 2015 09:37 PM
I recommend using a BodyGyro.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
03 Apr 2015 09:38 PM
CFrame.new (Vector3.new (0,0,0), workspace.Part.CFrame.lookVector)

http://wiki.roblox.com/index.php?title=CFrame
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Apr 2015 09:40 PM
Excuse me, Maxomega3, but that moves the player too. Unless you are using that with a BodyGyro, of corse. (Wow, I almost posted even knowing about that typo.)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2015 09:41 PM
local rot = workspace.Part.CFrame - workspace.Part.Position;

plr.Character.Torso.CFrame=CFrame.new(plr.Character.Torso.Position) * rot;
Report Abuse
ash877 is not online. ash877
Joined: 18 Feb 2008
Total Posts: 5142
03 Apr 2015 09:41 PM
trying to get the character to face the direction of a part.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Apr 2015 09:41 PM
Oh, face the part...

plr.Character.Torso.CFrame=CFrame.new(plr.Character.Torso.Position, workspace.Part.Position)
Report Abuse
ash877 is not online. ash877
Joined: 18 Feb 2008
Total Posts: 5142
03 Apr 2015 09:42 PM
thanks. I am trying to move the player :/.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Apr 2015 09:44 PM
I know that, ash. That's why I recommended BodyGyros...
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
03 Apr 2015 09:53 PM
Misread the question, whoops.
Yeah, what cntkillme said.
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