How would I make a bow like in Roblox Bedwars?

I’m struggling to figure out how to use a beam to show the path of the arrow like in Roblox Bedwars. Here’s a video of what I’m trying to accomplish: https://gyazo.com/16f6f318f6a612a9cfb6f1a175326dc9

Currently I’m trying to use the following post. Everytime Runservice.Renderstep fires, I get the position of where the player’s mouse is pointing to, and use that to modify the properties of the beam. The problem is that I don’t know what to set the velocity (mentioned in the following post) equal to so that the beam passes through where the mouse is pointing to.

If you have any suggestions on how to accomplish this, I’d really appreciate it. :slight_smile:

4 Likes

I learned trajectory from here also @XdJackyboiiXd21 this is another video I found it should be good I hope this helps you can skip around a bit to get to the part you want for your cool pvp game

also what your trying to do involves calculus so beware

1 Like

Can’t you put the 2nd beam attachment at the point where the mouse is hitting, then aim the 1st attachment slightly up? Then just make it curve in the beam properties.
The aim point seems to be tweened (maybe lerped?) with a bit of lag to make it smoother, or maybe that’s how beams work when the 2nd attachment is moved since I’ve never tried it.

@ZINTICK Thanks, that 2nd video is really helpful. I’ll try to use it in my script.
@Scottifly Yeah that would work well for the beam. The problem is that the beam likely wouldn’t follow the same path as the projectile. (I’m hoping for both the beam and the projectile to follow a parabolic arc).

3 Likes

Super sorry for the bump but just wanted to ask @XdJackyboiiXd21 if he has found a solution for his problem.

2 Likes

Soo lets stay that the projectile is an anchored projectile which uses CFrame to move . So now lets say the projectile speed is 1 studs/s and move down is (-Gtime^2) . So at 3 seconds , the projectile position will be (startPos+(directionspeedtime)+vector3.new(0,-Gtime^2)) , so you can do a loop that will find the position of the projectile every second and add a “waypoint” there eg:

for i =1 , 30 do
time = i * 1(if 1 is replace by .5 , there will be a waypoint every second)
waypointPos = (startPos+(direction*speed*time)+vector3.new(0,-G*time^2))
end 

keep in mind that that script is just a sample and will not work unless you understand what I had been explaining the past 23min and wright the script yourself

3 Likes