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: Position something in front of the player?

Previous Thread :: Next Thread 
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
04 Oct 2015 05:34 PM
I have a BodyPosition and I'm trying to figure out how to have it constantly in front of the player, no matter what direction they are facing. I tried messing around with lookVector but I couldn't figure out how to get it. Can someone explain how?
Report Abuse
FUNNYMELOL is not online. FUNNYMELOL
Joined: 09 Aug 2010
Total Posts: 68
04 Oct 2015 05:34 PM
Just use a Vector4, I bet you're too stupid to know what that is. Pleb.
Report Abuse
ShadyShock is not online. ShadyShock
Joined: 03 Dec 2013
Total Posts: 3372
04 Oct 2015 05:36 PM
@FUNNY

Get out.
Report Abuse
larr1212 is not online. larr1212
Joined: 06 Jan 2015
Total Posts: 259
04 Oct 2015 05:36 PM
Vector4 is not a correct term for CFrame.
Report Abuse
FUNNYMELOL is not online. FUNNYMELOL
Joined: 09 Aug 2010
Total Posts: 68
04 Oct 2015 05:41 PM
I know, I was testing you idiots.
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
04 Oct 2015 05:43 PM
you're humiliating yourself..
Report Abuse
FUNNYMELOL is not online. FUNNYMELOL
Joined: 09 Aug 2010
Total Posts: 68
04 Oct 2015 05:44 PM
Your look is humiliating, and the fact that you think you can code. You idiots sicken me.
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
04 Oct 2015 05:48 PM
Bump
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
04 Oct 2015 05:52 PM
When you say "in front of," what is your frame of reference?

Would you like it to be "in front of" the player's view (i.e. the camera) or "in front of" the player's character?
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
04 Oct 2015 05:53 PM
Sorry, I mean in the direction that their torso is facing
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Oct 2015 05:53 PM
part.CFrame = torso.CFrame * CFrame.new(0, 0, -5)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Oct 2015 05:54 PM
You can weld it if you don't wanna continually update it but that'd add mass to your character IIRC.
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
04 Oct 2015 06:05 PM
Is it possible to have it as a Vector3 value? I'm using it to position a BodyPosition
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
04 Oct 2015 06:06 PM
(torso.CFrame * CFrame.new(0, 0, -5)).p


~The Wizard
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Oct 2015 06:07 PM
part.CFrame = torso.CFrame * Vector3.new(0, 0, -5)
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
04 Oct 2015 06:09 PM
Thanks
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
04 Oct 2015 06:10 PM
woops it would be blah.Position or blah.Velocity or whatever you're doing, not blah.CFrame =
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
04 Oct 2015 06:18 PM
Suggested reading:
http://wiki.roblox.com/index.php?title=CFrame#Local_and_World_Space
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