Im trying to make terrain useing apis and i tried switching to editable mesh but this pattern wont get off it i have checked everything
local a = Vector3.new((x - 2) * spacing, heightData[y-1][x-1]* intensity, (y - 2) * spacing)
local b = Vector3.new((x - 1) * spacing, heightData[y-1][x]* intensity, (y - 2) * spacing)
local c = Vector3.new((x - 2) * spacing, heightData[y][x-1]* intensity, (y - 1) * spacing)
--draw3dTriangle(a, b, c, sateliteData[y][x])
local d = Vector3.new((x - 1) * spacing, heightData[y][x]* intensity, (y - 1) * spacing)
--draw3dTriangle(c, b, d, sateliteData[y][x])
local A = editableimage:AddVertex(a)
local B = editableimage:AddVertex(b)
local C = editableimage:AddVertex(c)
local D = editableimage:AddVertex(d)
editableimage:AddTriangle(A, B, C)
editableimage:AddTriangle(C, B, D)