Heres my code.
local yoffset = 1 local minx = (v.Baseplate.Size.X / 2) - v.Baseplate.Position.X local maxx = (v.Baseplate.Size.X / 2) + v.Baseplate.Position.X local minz = (v.Baseplate.Size.Z / 2) - v.Baseplate.Position.Z local maxz = (v.Baseplate.Size.Z / 2) + v.Baseplate.Position.Z local y = (v.Baseplate.Size.Y / 2) + v.Baseplate.Position.Y + yoffset local randX = mainrand.RandomMINMAX(minx,maxx) local randZ = mainrand.RandomMINMAX(minz,maxz) local clone = q.Asset:Clone() print("located at minimum "..minx.." maximum "..maxx..",".." "..minz.." "..maxz) clone.Position = Vector3.new(randX,y,randZ) clone.Parent = v.Extras
https://gyazo.com/380924e4ebc236fbf150faa95116248a The rocks are supposed to be on the sand.
You could do something like this:
math.randomseed(tick()) local target = workspace.Baseplate local x = math.random(target.position.X - target.Size.X / 2, target.position.X + target.Size.X / 2) local z = math.random(target.position.Z - target.Size.Z / 2, target.position.Z + target.Size.Z / 2)