I have a map located at 0, 0, 0 with dimensions of 896, 896, 896. Let's say I want to generate a part with a random x and y position on said map. So I do:
local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace
part.Position = Vector3.new(math.random(896, -896), math.random(125, 150), math.random(896, -896))
However, running this code gives the following error:
invalid argument #2 to 'random' (interval is empty)
As you can see, however, the interval is not empty. Any help would be appreciated!

3 comments
You're putting the negative and positive numbers in the wrong spot. Smaller numbers go on the left side like on a number line. Swap the negative number and the positive number. Also, you may want to half the number of 896 since you don't want the part to spawn outside of the map.
Use math.random(-448,448) instead. If the bottom left corner of the map were located at 0,0,0 then you'd use 0,896. Since the center of the map is at 0,0,0, use half of the map's size.
Thx! Also leave it as an answer so I can accept :P