Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I use FindFirstChild to see if an item has a certain classname?

Asked by 4 years ago
Edited 4 years ago

How would I do FindFirstChild to see if a bool value is there, the bool value won't be named bool value. Also, I know this isn't the correct code, it's just part of my script. Isn't there a way to see classnames of items? If there is, how do I use this in FindFirstChild?

for i, v in pairs(game.Players:GetPlayers()) do
        if v:FindFirstChild(RightHere) then

1 answer

Log in to vote
2
Answered by 4 years ago

FindFirstChildOfClass("Class name here")

0
or if you just want to check for a class name of something you already have you can do thing:IsA("Class Name") karesiku 72 — 4y
1
or .ClassName == "" greatneil80 2647 — 4y
0
he wants to find a child's classname in this case and that requires what i said Gameplayer365247v2 1055 — 4y
0
It works with all the methods stated in the comment including your answer. greatneil80 2647 — 4y
0
yes but hes not asking for every method, hes asking for what i gave Gameplayer365247v2 1055 — 4y
Ad

Answer this question