How to check if a specific instance is the child of an object

I need to be able to check if a specific instance is a child of something. So for example if I moved a part from workspace to a folder:

local part = Instance.new("Part")
part.Parent = workspace
wait(3)
part.Parent = workspace.PartsOfGame

And I wanted to make sure that that specific part was inside of the folder how could I do it? I can’t use :FindFirstChild() since it uses a string and what if multiple parts had the same name of the part I’m looking for?

use a if statement

if part.Parent == workspace.PartsofGame then

I didn’t really get what you mean.

If you want to check if an instance is a parent of another object then use the Parent property.

print(part.Parent == workspace.PartsOfGame) --> true