Why is this if statement not filtering terrain

Hello, I am trying to make a minimap but I am getting this error I don’t know how to fix.
image

for _, v in pairs(workspace:GetDescendants()) do
	if v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA("MeshPart") then
		v:Clone().Parent = minimapFrame
	end
end

Thanks for reading.

1 Like

Change this:

For this:

if v:IsA("BasePart") and not v:IsA("Terrain") then
2 Likes

That’s because Terrain is a BasePart:

3 Likes