This is what I’ve got so far, I’ve made a table of all corners on the plot and object.
function isObjectOnPlot(object, plot)
local ObjectDim = object.Size/2
local PlotDim = plot.Size/2
local ObjectCorners = { -- Table of all the corners' positions on the object
object.CFrame * CFrame.new(ObjectDim.X, ObjectDim.Y, ObjectDim.Z),
object.CFrame * CFrame.new(ObjectDim.X, ObjectDim.Y, -ObjectDim.Z),
object.CFrame * CFrame.new(ObjectDim.X, -ObjectDim.Y, ObjectDim.Z),
object.CFrame * CFrame.new(ObjectDim.X, -ObjectDim.Y, -ObjectDim.Z),
object.CFrame * CFrame.new(-ObjectDim.X, ObjectDim.Y, ObjectDim.Z),
object.CFrame * CFrame.new(-ObjectDim.X, ObjectDim.Y, -ObjectDim.Z),
object.CFrame * CFrame.new(-ObjectDim.X, -ObjectDim.Y, ObjectDim.Z),
object.CFrame * CFrame.new(-ObjectDim.X, -ObjectDim.Y, -ObjectDim.Z)
}
local PlotCorners = { -- Table of all corners' positions on the plot
plot.CFrame * CFrame.new(PlotDim.X, PlotDim.Y, PlotDim.Z),
plot.CFrame * CFrame.new(PlotDim.X, PlotDim.Y, -PlotDim.Z),
plot.CFrame * CFrame.new(PlotDim.X, -PlotDim.Y, PlotDim.Z),
plot.CFrame * CFrame.new(PlotDim.X, -PlotDim.Y, -PlotDim.Z),
plot.CFrame * CFrame.new(-PlotDim.X, PlotDim.Y, PlotDim.Z),
plot.CFrame * CFrame.new(-PlotDim.X, PlotDim.Y, -PlotDim.Z),
plot.CFrame * CFrame.new(-PlotDim.X, -PlotDim.Y, PlotDim.Z),
plot.CFrame * CFrame.new(-PlotDim.X, -PlotDim.Y, -PlotDim.Z)
}
end
I’m sure you can use the corners of the plot to detect if the object is on the plot or not, but I’m not sure how to do that