What does the random offset part in the script mean?

This script was given to me by someone here in Devforum, but I don’t have a clue what this part of the script means. It’s the only thing that needs clarification.

local TargetPosition = QuadraticBezier(t , Position_Start, (CFrame.new(Midpoint)*Random_Offset).p, Position_End);```

Random offset seems to be a variable here, and it should be a Vector3 value , which in this scenario should control the curve in a bezier curve.

Yes, but the script isn’t mine. I just got the script through pms.

RndCF is the random offset

		local rndCF = CFrame.new(rnd:NextInteger(-1,1),rnd:NextNumber(-1.5,1.5),rnd:NextNumber(-1,-5.5))

Random offset is a vector 3 and controls the curviness of the bezier curve as point p1 in the image below.

Currently it’s within the midpoint of p0 and p2 from CFrame.new(Midpoint) which makes it not as curvy. Consequently thats why its multiplied by Random_Offset in order to create the curve.

I believe it’s overcomplicated though. You could just do this to create and offset and create the curviness.

local Random_Offset : Vector3
Midpoint + Random_Offset

Well here it is getting a random cframe using the random function.

take a look at this for more info on random and the :NextInterger function he uses.