I have been trying to use bodyvelocity to attempt to shoot the Basketball in the hoop and ive gotten no such luck What im trying to do is after the player has shot the ball I already made it to where I can determine a good percentage and a bad percentage of the shot you took now the only problem is that I am having SERIOUS trouble trying to understand trajectory from the basketball to the hoop --Note basketball is in my (RIGHT HAND)
--Here is the script involving bodyvelocity--(Does not travel to the hoop but does look natural and blends with roblox's physics)
local ball = script.Parent local BBV = Instance.new("BodyVelocity", ball) BBV.MaxForce = Vector3.new(0,goal.CFrame,0) BBV.P = 2000
--NOTE I AM AWARE THIS DOES NOT GO TO THE HOOP I WAS JUST AT A LOSS OF WHAT TO DO SO I DECIDED TO USE ROCKETPROPULSION
--After I got frustrated I tried using RocketPropulsion/ this takes me to the hoop but it doesn't look like it blends with roblox's natural physics so note (This goes into the hoop but it just travels to the hoop as if it were a heat seeking missle)
local goal = workspace.NetOne.Scorer local ball = script.Parent local BV = Instance.new("RocketPropulsion", ball) BV.Target = goal BV.CartoonFactor = 0 BV.TargetRadius = 1 BV.ThrustP = 7 BV.MaxTorque = Vector3.new(0,0,0) BV:Fire()
Im somewhat at a loss here help will be appreciated thanks!
You can use ray reflections to make your basketball bounce, but it wouldn't look too realistic. It's not too hard to edit it, though. ROBLOX Wiki made a page about it.