assert(material, "No material specified")
assert(targetMaterial, "No target material specified")
-- Reset plot terrain
local cfr, size = self.Object.CFrame, self.Object.Size
local ratio = 25
size = size + Vector3.new(ratio, ratio, ratio)
local bottom = cfr - (size / 2)
local upper = cfr + (size / 2)
local region = Region3.new(bottom:PointToWorldSpace(), upper:PointToWorldSpace()):ExpandToGrid(4)
Workspace.Terrain:ReplaceMaterial(region, 4, material, targetMaterial)
I’m really not sure of how I would be able to get the position of the CFrame when it’s rotation is not set to 0, 0, 0.