I'm trying to create new instances of part in a certain area. I'm using a variable to make it easy.
local position1 = math.random (-238.641, -200.141)
local position3 = math.random(-195.442, -154.443)
position 1 is on the x axis, and position 3 is on z axis. every time i create a new part and put,
NewPart1.Position = Vector3.new(position1, 30, position3)
it works! but if i do two, for example,
NewPart2.Position = Vector3.new(position1, 30, position3)
it uses the same exact random number as NewPart1
and when i run the game, they are stacked on top of each other.
Can someone solve my issue?
I've tried making other variables for NewPart2 like
local positionx = math.random (-238.641, -200.141)
local positionz = math.random(-195.442, -154.443)
and it works!, but it gets messy. and i'm trying to put 10 of those. so i'll have to do 8 more different variables. and it's really messy!

4 comments
Its because the math.random is inside a variable which doesnt change if you just use it again you have to generate another one to change the output
so I would have to make several math.randoms?
No use math.randomseed(os.time()) at the top to randomize the seed
but i want it to choose a random number in between -238.641 and -200.141 or -195.442 and -154.443