So I am trying to teleport a brick to a random location on top of a brick, the bricks position that im trying to teleport the other brick on top of is
30, 0.5, -38
The brick is teleporting fine but what I need help with is generating a completely random location within the position of the brick that im teleporting the other brick too, the brick is of size:
78, 1, 68
The code for generating the random numbers is as follows:
x = r:NextInteger(100,30) / 10 y = r:NextInteger(0, 100) / 10 z = r:NextInteger(200, -38) / 10
My friend recommended me to use these parameters divided by 10 to get the random points inside of the brick. Any help is much appreciated :)
(r is the random object created earlier in the code)
Thank you
This answer might help you: https://scriptinghelpers.org/questions/60690/returning-random-vector3-values-that-are-inside-a-volume-of-a-part#59038