i have an ipairs for loop which iterates through game:GetDescendants() and checks if the descendant is a BasePart, somehow the roblox terrain object is being recognized as a BasePart
while task.wait(1) do
for _,Descendant in ipairs(game:GetDescendants()) do
if Descendant:IsA("BasePart") then
if Descendant.ClassName == "Terrain" then
print("How Is This Classified As A BasePart???")
end
end
end
end
BasePart is an abstract base class for in-world objects that render and are physically simulated while in the Workspace. There are several implementations of BasePart, the most common being Part and MeshPart. Others include WedgePart, SpawnLocation, and the singleton Terrain object. Generally, when documentation refers to a “part,” most BasePart implementations will work and not just Part.
No, Terrain is a BasePart. Unfortunately I can’t find any class tree on the wiki, but you can usually see what superclasses a class has based on it’s “inherited from”
Try it and see. I’d guess not, but it probably won’t actually do anything either.
I’d guess it was just the simplest way of making it work with other systems that expect to work with BaseParts, like raycasts, physics constraints and probably other things.