peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 16 Aug 2016 11:25 PM |
that shoots a ball to the hoop position anyway to calculate how much velocity u need from ur position to the hoop
this line --Tool.Handle.Velocity = (shootTowards * 75)+Vector3.new(0, 80, 0)
local Tool = script.Parent local Character = Tool.Parent local Player = game.Players:playerFromCharacter(Character) local spawnPos = Character.PrimaryPart.Position local character = Tool.Parent local humanoid = character.Humanoid local target = workspace.hoop.Position local shootTowards = (target - character.Head.Position).unit spawnPos = spawnPos + (shootTowards * 5) wait() Tool.Parent = game.Workspace Tool.Handle.Position = spawnPos Tool.Handle.Velocity = (shootTowards * 75)+Vector3.new(0, 80, 0)
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:26 PM |
| use (distance*velocity)/drag |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 16 Aug 2016 11:34 PM |
isnt that what im doing
local target = workspace.hoop.Position local shootTowards = (target - character.Head.Position).unit (shootTowards * 75)
what is /drag
|
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
|
| 16 Aug 2016 11:42 PM |
Unit = direction (Vector3) Magnitude = distance (float)
|
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 16 Aug 2016 11:49 PM |
ok i did this
local shootTowards = (target - character.Head.Position).unit local velocity = (target - character.Head.Position).magnitude Tool.Handle.Velocity = (shootTowards * velocity)+Vector3.new(0, 80, 0)
when faraway it lands about 3 studs infront of it
when close it works pretty good
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2016 11:50 PM |
then you might want to subtract something like distance/20
small number but will help |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 16 Aug 2016 11:56 PM |
thx for ur help
kinda got it goin
|
|
|
| Report Abuse |
|
|