mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 21:10:36 +00:00
21 lines
589 B
Text
21 lines
589 B
Text
local roblox = require("@lune/roblox")
|
|
local Instance = roblox.Instance
|
|
|
|
local root = Instance.new("Folder")
|
|
local child = Instance.new("Model")
|
|
local descendant = Instance.new("Part")
|
|
|
|
child.Parent = root
|
|
descendant.Parent = child
|
|
|
|
assert(not root:IsAncestorOf(root))
|
|
assert(not child:IsAncestorOf(root))
|
|
assert(not descendant:IsAncestorOf(root))
|
|
|
|
assert(root:IsAncestorOf(child))
|
|
assert(not child:IsAncestorOf(child))
|
|
assert(not descendant:IsAncestorOf(child))
|
|
|
|
assert(root:IsAncestorOf(descendant))
|
|
assert(child:IsAncestorOf(descendant))
|
|
assert(not descendant:IsAncestorOf(descendant))
|