So my baseplate has the size: 100.65, 11.744, 100.65
Now I want a brick to spawn somewhere on the baseplate. But I think im mesing something up with the math.random() function. The following code is supposed to spawn the bricks at a random position on the baseplate as I already said. But they fly off the map.
while wait(0.4) do
local Meteor = game.Lighting.Meteor:Clone()
local PosX = math.random(0,100)
local PosY = 130
local PosZ = math.random(0,100)
Meteor.Parent = game.Workspace
Meteor.Position = Vector3.new(PosX, PosY, PosZ)
end
So I made it that pos x and z change since pos y needs to be the same hight.

2 comments
math.random isn't the problem, you can check with using print
How?