Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I find the references by my self?

if i for exampled wanted the game to check if an object is a Part what is the reference for it? like for example if X is a part then print 'it's a part'

1 answer

✓ Accepted answer

Use IsA

local X = Instance.new('Part')

if X:IsA('Part') then
	print("Congrats it's a part")
end

The IsA('Part') return true just if the object is a part, otherwise it's return false. So if you want that return true when you print with a meshpart instance or other basepart, just use "BasePart" like that

print(X:IsA('BasePart')) -- return true if is a Part/ MeshPart/ WedgePart/ ect...

IsA work with the ClassName of the Instance, to know what's the ClassName of your Instance, check in this properties.

This discussion is preserved as it was. New answers, comments, and votes are closed.