I'm trying to make, let's just say, rain. So I have an invisible block called DropZone and I want it so the "rain" drops ONLY in random positions that are in that block, so that the "rain" won't spawn randomly in the entire world, but only in the boundaries of this block. I've tried multiple different things, but to no avail. Here is the two scripts I tried.
newTeapot.Position = Vector3.new(
math.random(
-dropZone.Position.X * 2,
dropZone.Position.X * 2
),
dropZone.Position.Y,
math.random(
-dropZone.Position.Z * 2,
dropZone.Position.Z * 2
)
)
newTeapot.Position = Vector3.new(
math.random(
-dropZone.Position.X / 2,
dropZone.Position.X / 2
),
dropZone.Position.Y,
math.random(
dropZone.Position.Z / 2,
-dropZone.Position.Z / 2
)
)

1 comment
Thank you! Worked perfectly.