So a few months ago I was curious about how fighting games like Your Bizzare Adventure achieved a good-looking barrage effect. Originally I had thought it was simple animation tricks, but if you’ve worked with animations on Roblox, you’d know that achieving the sort of hundreds of hands effect is not possible with animations alone. After a bit of research, I discovered bezier curves, and after experimenting with them a bit, I was able to achieve an effect I liked, that mimicked the effect you see in games like YBA:
And now I would like to share it, as I had a hard time figuring it out, and I have noticed quite a bit of people want to achieve this sort of effect. So here it is:
I’ve also created an Uncopylocked place with some added VFX that aren’t present in the model.
Using the module is incredibly simple:
local bm = require(script.BarrageModule)
local distance = 7 --How many studs in front of the player the barrage will reach
local speed = 20 --how slow you want the punch to go. The higher this number is, the slower the punch travels.
local rate =0.015 --delay between punches. uses task.wait() so the minimum value is 0.015
local armCopy = true -- whether or not you want the punches to copy the meshes of the arms. When set to false the arms will be the standard blocky ones.
bm.barragestart(char, distance, speed, rate, armCopy)
And when you want to end it:
bm.barragend(char)
Distance changes the distance of the barrage, and can lead to some entertaining results when set to higher numbers:
Speed is how long it takes for the punch to reach the end. Increasing this too high results in a ludicrous amount of punches:
Rate is the delay in seconds between each punch. Lowering it increases how many punches you have, and increasing it decreases how many punches you have:
And armCopy is whether or not you want the punches to copy the meshes of your arms. When set to true and your character has non blocky arms, it looks like this:
Now if you’re curious as to how it works, it simply just clones both of the player’s arms and makes them travel along 2 different randomized curves, until they reach the specified distance away from the player. It is just two loops that constantly repeat this process for each arm until barragend() is called. And since it clones the players arms, any VFX you put into the players arms will be copied onto the barrage as well.
Now there are a few caveats that should be considered:
-
This only works with R6, you could probably figure it out with R15 pretty easily though.
-
This was made more for educational purposes than efficiency or reliability, meaning that performance is not something I thought much of when making this, it was moreso for me to learn and I am now just sharing what I’ve learned.If you want to take what I’ve made here, and vastly improve upon it, then you are free to do so.
-
I made this at a time when I was still learning a lot of things scripting-wise, and I wrote it in about 3 hours. So if you’re a beginner looking at this wanting to learn, then maybe follow the concepts and not so much the actual code.
And that’s about it. See ya.