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: make part move in front of player

Previous Thread :: Next Thread 
florodude is not online. florodude
Joined: 20 Jan 2009
Total Posts: 240
03 Apr 2017 03:12 PM
Hey all,

I'm currently creating a projectile of sorts. It's a part that I'd like to spawn in front of the player (I've scripted this part successfully) and move in front of the player. I have it so it will move in a direction like so:

part.Position = part.Position + Vector3.new(0,5,0)

The problem as most of you will pick up on is that it moves that part a certain direction regardless of player's view.

Any help would be welcomed.
Report Abuse
Railmints is not online. Railmints
Joined: 11 Aug 2014
Total Posts: 272
03 Apr 2017 03:16 PM
you can use the players torsos look vector as a direction like~~

game.Players.LocalPlayer.Torso.CFrame.lookVector

then make a body velocity object and make its speed the same value as the look vector. Theres more ways to do it than just one.
Report Abuse
Nuclear_Energy is online. Nuclear_Energy
Joined: 21 Jul 2013
Total Posts: 1380
03 Apr 2017 03:17 PM
part.position = 0 0 0
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