Is there any other way for me to shorten this code?

How could I shorten lines 7 and 8’s y values?

while true do
	task.wait(5)
	
	local rightCF2 = RootPartCF * CFrame.new(math.random(1, 5), math.random(-1, 4), -3.5)
	local leftCF2 = RootPartCF * CFrame.new(math.random(-5, -1), math.random(-1, 4), -3.5)
	
	local rightCF1 = RootPartCF * CFrame.new(math.random(2, 4), rightCF2:ToObjectSpace(RootPartCF):Inverse().Y - 1.5, math.random(1, 3))
	local leftCF1 = RootPartCF * CFrame.new(math.random(-4, -2), leftCF2:ToObjectSpace(RootPartCF):Inverse().Y - 1.5, math.random(1, 3))
	
	local CF3 = 'place holder value'
end

I am trying to make it so rightCF1’s Y value will always be 1.5 less than rightCF2’s Y value. This works however I wonder if there is another way that gets me the exact same results but uses less coding and is better suited for cases like these. What I did was I found the offset of rightCF2’s from the RootPartCF and subtracted 1.5 from that offsets Y value. (Same thing for leftCF1)

It looks just fine, it just ends up being alot tankier than lines 4&5
If you want you can move the content after the comma down on the line below to make it easier to read

It already looks good. You should just move the lines apart to make them easier to read. (Also in my experience you should use Random.new():NextInteger(n1, n2) instead of math.random(n1, n2) since it generates more random numbers for me)