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 » Scripting Helpers
Home Search
 

Re: How do I make a bullet move slower?

Previous Thread :: Next Thread 
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 05:23 PM
I'm making a matrix gun, that allows you to slow down every bullet in the game for a limited time.

I know I have to lower the velocity, but how do I lower the velocity of something if the velocity changes so often? i can't change anything as random as this

486.984772, 54.447525, 632.361633
346.83374, -217.554779, 687.296326
620.448181, 141.663666, 484.742645
734.500305, 170.425171, 267.328552
-224.25528, 194.890381, 742.783447
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 05:53 PM
.

Report Abuse
DerProgrammierer is not online. DerProgrammierer
Joined: 16 Aug 2007
Total Posts: 12992
01 Oct 2014 06:02 PM
You apply less velocity in the opposite direction.
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 06:08 PM
i can't do that cause the velocitys are so random

the speed i'm trying to make them go at is really slow

so if i took like 600 from 620, then what do i do if the velocity is 500,
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
01 Oct 2014 06:11 PM
Set the speed to a constant number?

-Vanilla
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 06:14 PM
can't

if velocity is

734.500305, 170.425171, 267.328552

and i set it to 500,0,0

it'll just go straight in a certain diagonal

Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 06:14 PM
in a certain direction*

poker123456789 owes me 40k robux & theraptradingguest scammed vetrius
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
01 Oct 2014 06:16 PM
Slow down by percentage?

-Vanilla
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 06:18 PM
so like

if velocity.X > velocity.Z then

X = velocity.X
Y = velocity.Y
Z = velocity.Z

Velocity = Vector3.new(X/5,Y,Z)
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
01 Oct 2014 06:24 PM
You could offset the gravity with a BodyForce (Y-axis force of 196.2*part:GetMass()) and then manipulate the velocity with a BodyVelocity. You'll get a smooth transition and you can manipulate the maxForce to set the rate at which they slow & speed up. Shouldn't require any math since velocity is in object coordinates (ie, relative to the traveling bullet).
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 06:28 PM
im very confused lol

i get confused easily
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
01 Oct 2014 07:22 PM
Okay, so the problem with slowing the velocity of the bullets is that they only have a short time before gravity pulls them down to the ground. To suspend them in air, you need to negative gravity acceleration by applying a BodyForce upwards on the Y-axis. Since Force = mass * acceleration and ROBLOX gravity is 196.2 studs per second, you're gonna want to multiply mass time gravity to get your force.

The next issue is adjusting the velocity of the bullets. I've not tested manually editing the Velocity property, I would normally assume that multiplying it by 0.01 or so would work fine, so I would disregard my suggestion about BodyVelocity--but if all else fails, you can try using BodyVelocity to adjust it. As per other user's suggestions, a percent multiplier should do the trick.
Report Abuse
matteo101man is not online. matteo101man
Joined: 21 Jul 2012
Total Posts: 13
01 Oct 2014 07:48 PM
Or do the noob way and anchor for a split second and unanchor
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
01 Oct 2014 09:30 PM
i got it now, everyone here helped greatly, i was really ready to stop cause of something as small as that. now i'm going to make the bullet have transparent rings come from behind it
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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