Hi,
So i was wondering what’s the Difference between
FindFirstChildOfClass()
and
FindFirstChildWhichIsA()
Whats the Difference? or Are they the same?
And What are the Differences?
Hi,
So i was wondering what’s the Difference between
FindFirstChildOfClass()
and
FindFirstChildWhichIsA()
Whats the Difference? or Are they the same?
And What are the Differences?
they’re the complete same thing just spelled differently
onto one exeption if you go to a part in the explorer you will see a thing called class and if you look at it. that is what findfirstchildofclass is using. I typically use findfirstchildofclass because it works the best for me.
So They are the same?
Text
yes and no.
if you did
workspace:FindFirstChildOfClass(“BasePart”)
and if you had a part it will print nil
if you did
workspace:FindFirstChildWhichIsA(“BasePart”)
if will print something that has to deal with parts
its findfirstchildofclass is
findfirstchildwhichisa is bascially if part:IsA(“BasePart”) then balblablab
baseparts deals with Parts Unions and MeshParts
I Understand what FindFirstChildOfClass()
does, i just wanted to know the Difference between the other FindFirstChildWhichIsA()
thanks tho
For a more accurate answer, OfClass is for finding an exact object class. For example, an ImageButton would be
FindFirstChildOfClass("ImageButton") --> The ImageButton
IsA includes the class for the instance + any abstract classes it inherits. It basically has to do with Object Inheritance. ImageButton is part of the GuiButton class so you can do
FindFirstChildWhichIsA("GuiButton") --> The ImageButton
You can view what other classes an instance inherits on the documentation.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.