Difference between these two?

  1. What do you want to achieve?
    I want to figure out the difference between FindFirstChildOfClass and FindFirstChildWhichIsA

  2. What is the issue?
    I have looked at many scripts and it looks like they do the same thing.

  3. What solutions have you tried so far?
    I have looked at api-references, but I still don’t understand the difference.

FindFirstChildOfClass

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local humanoid
while not humanoid do
    humanoid = character:FindFirstChildOfClass("Humanoid")
    if not humanoid then
        character.ChildAdded:wait()
    end
end

FindFirstChildWhichIsA

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local humanoid
while not humanoid do
    humanoid = character:FindFirstChildWhichIsA("Humanoid")
    if not humanoid then
        character.ChildAdded:wait()
    end
end

Any help differentiating these two things would be amazing.

Thank you.

Found this reply:

1 Like

Thanks! I should have spent a little more time searching around.