what i tried:
game.Workspace:GetDescendants(isA(Beam))
please help me figure out how to fix this
use a for i loop
for i, v in pairs(game.Workspace:GetDescendants) do if v:IsA("Beam") then --code end
another solution is to use FindFirstChildWhichIsA()
, it finds the children by its class:
game.Workspace:FindFirstChildWhichIsA("Beam")