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 you make a bullet shoot straight and not Mouse.hit.p

Previous Thread :: Next Thread 
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
28 Dec 2015 11:29 PM
So basically it just comes out of the hole and fly's straight. I know there was a thread about this but I forgot it. Could someone help?

~Previously known as Zztheses
Report Abuse
ThoughtConduit is not online. ThoughtConduit
Joined: 30 Nov 2015
Total Posts: 536
28 Dec 2015 11:33 PM
use the lookvector of the handle
Report Abuse
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
28 Dec 2015 11:35 PM
I have a area where the bullet intends to spawn, but it is based on Mouse.Hit.p, how would I make it so it fly's just straight?

~Previously known as Zztheses
Report Abuse
ThoughtConduit is not online. ThoughtConduit
Joined: 30 Nov 2015
Total Posts: 536
28 Dec 2015 11:37 PM
the answer is still lookvector
Report Abuse
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
28 Dec 2015 11:52 PM
Bump

~Previously known as Zztheses
Report Abuse
benthanh123 is not online. benthanh123
Joined: 27 May 2010
Total Posts: 567
29 Dec 2015 12:03 AM
You just ignore the guy
Report Abuse
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
29 Dec 2015 12:04 AM
Saying 'use lookvector' isn't much help.

~Previously known as Zztheses
Report Abuse
benthanh123 is not online. benthanh123
Joined: 27 May 2010
Total Posts: 567
29 Dec 2015 12:05 AM
Handle.CFrame.lookVector
Report Abuse
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
29 Dec 2015 12:06 AM
This is where it positions is;

bullet.CFrame = script.Parent:WaitForChild('WhereBulletsSpawn').CFrame
bullet.CFrame = CFrame.new(bullet.Position, mouse.Hit.p)

How would I made it so it's not mouse.Hit.p but it's just straight?

~Previously known as Zztheses
Report Abuse
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
29 Dec 2015 12:31 AM
use the fooking lookvector and fooking bodyvelocity
Report Abuse
usermvp is not online. usermvp
Joined: 29 Jun 2013
Total Posts: 188
29 Dec 2015 12:38 AM
This is the part that makes it shoot

local mousecframe = mouse.Hit
local newcframe = CFrame.new(mousecframe.X, mousecframe.Y, 0)

bullet.CFrame = m9:WaitForChild('WhereBulletsSpawn').CFrame
bullet.CFrame = newcframe * CFrame.new(mousecframe.X, mousecframe.Y, 0)

local bv = Instance.new('BodyVelocity', bullet)
bv.Name = 'BV'
bv.velocity = bullet.CFrame.lookVector * 550

Won't work

~Previously known as Zztheses
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