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

How to use :isA() on an object's (unnamed) children?

what i tried:

game.Workspace:GetDescendants(isA(Beam))

please help me figure out how to fix this

2 answers

✓ Accepted answer

use a for i loop

for i, v in pairs(game.Workspace:GetDescendants) do
	if v:IsA("Beam") then
	--code
end

1 comment

0

thank you

another solution is to use FindFirstChildWhichIsA(), it finds the children by its class:

game.Workspace:FindFirstChildWhichIsA("Beam")

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