-
What do you want to achieve?
I want to figure out the difference between FindFirstChildOfClass and FindFirstChildWhichIsA -
What is the issue?
I have looked at many scripts and it looks like they do the same thing. -
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.