I'll just give ya the code here
1 if p.Position.Y > -200 then
2 x = p.Position.Y
3 elseif p.Position.Y < -200 then
4 x = 200
5 end
6
7
8 local asphalt = Instance.new("Part")
9 asphalt.Anchored =true
10 asphalt.CanCollide=false
11 print(x)
12 asphalt.Size = Vector3.new(p.Size.X, (-1*math.random(100-100,x-100))- -1000, p.Size.Z)
13 asphalt.Position = Vector3.new(p.Position.X,-1000 + asphalt.Size.Y/2,p.Position.Z)
14 workspace.Terrain:FillBlock(asphalt.CFrame, asphalt.Size,Enum.Material.Asphalt)
At line 12 I get the error
bad argument #2 to 'random' (interval is empty)
At line 11 I get
-114.92626190186
This code seems perfectly fine, what's the problem here?

2 comments
at one point arg #2 in less than #1 thefore erroring an empty interval, or x-100 is extremely large
Thank you, that worked. I wrote an if statement and everything is fine now.