I’m trying to get a random point inside of a angle at the front of the user.
I want this point to be on a random range of a couple (1-10) studs on the Y and X axis infront of the user, with a variable Z axis.
Here’s an image of what I’m trying to achieve.
With the y-axis being added into the equation, I’m trying to get the angle depicted as well as a random heighth.
How would this be done correctly?
Here’s a failed attempt of my shot at preforming this :
local randomCircle = math.random() * math.pi local Angle = CFrame.new(char.PrimaryPart.Position) * CFrame.Angles(0, angle + math.deg(90), 0) * CFrame.new(0, math.random(-3,3), -7) --my equation got wrong and wronger