The script here works without errors, but I can never check to see the type of the block underneath the current one, how can I access the position_pairs using a vector 3 value.
local rp = game:GetService("ReplicatedStorage")
local first = Vector3.new(0,0,0)
local positions = {}
local position_pairs = {}
local values = function(text)
end
for a = 1,10 do
for b = 1, 5 do
for c = 1,10 do
table.insert(positions,1,Vector3.new(a*10,b*10,c*10))
end
end
end
for i, v in pairs(positions) do
local random = math.random(1,10)
if random > 2 and v.Y < 11 then
position_pairs[v] = "Dirt"
local part = rp:FindFirstChild("Dirt"):Clone()
part.Parent = workspace
part.PrimaryPart = part.Dirt
part:SetPrimaryPartCFrame(CFrame.new(v))
continue
end
if v.Y < 21 and not position_pairs[v-Vector3.new(0,10,0)] == "Dirt" then
local part = rp:FindFirstChild("Grass_Block"):Clone()
part.Parent = workspace
part.PrimaryPart = part.Grass
part:SetPrimaryPartCFrame(CFrame.new(v))
end
print(position_pairs[tostring(v-Vector3.new(0,10,0))])
end