This article is a stub. You can help the Roblox Wikia by expanding it.

IsDescendantOf is a member function of Instance used to determine whether or not the provided object is a parent or distant parent of the calling object.

function object:IsDescendantOf(item)

local test = self

while test ~= item do

test = test.Parent

if item ~= game and test == game then return false end


return true