How to make a part's position move randomly but align with the HumanoidRootPart?

Hi DevForum,

I came across a question while scripting. I was trying to make a barrage test, and noticed how a part was always keeping the same Position it has, and wondered how i would make the barrage have that “spread” by moving the part’s position left or right from the LookVector of the HumanoidRootPart.

For Example,

What I have right now:

What I want to achieve:

Meaning, the position randomizes based where the HumanoidRootPart is facing. I already have the part set where the orientation of the part is aligned with the HRP.

1 Like

You already have the axis of the RightVector and UpVector of the humanoid root part as well.

Just add on to that to the current position with a random number


1 Like