Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to calculate a ball throw?

1 answer

✓ Accepted answer

there is easy way to do it.

  1. Roblox has gravity, when the ball moves, the gravity will pull the ball to the ground.
  2. You set a speed to the ball, the ball will move through the space without your control.

so one script

	ball.Velocity = directionVector * speed    
	-- something like Vector3.new(0.5,0.2,0.5) * 200

will make your ball fly.

However, it you have to make the tool hit that target, it will not be easy. you need to build the formula,

  1. calculate how many seconds it takes the ball from current height to hit the ground
  2. how fast the speed needs to be in order for the ball to reach the target in that many seconds you just calculated above.
  3. make sure you ball fly out flat, if you throw the ball up an angle, you just make the calculation more complicated.

This discussion is preserved as it was. New answers, comments, and votes are closed.