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

How to not make get children not get a humanoid?

Asked by 4 years ago

for i,v in pairs(Mons) do v.Transparency = 1 end

it said that the humanoid idoenst have transparency how to not get the humanoid

0
local Mons = game.Workspace.Monst:GetChildren() Cyrellejheff 11 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Assuming "Mons" is a table derived from :GetChildren()

for i, v in pairs(Mons) do
    if v:IsA("BasePart") then
        v.Transparency = 1
    end
end

"BasePart" is used since all Parts (Corner, Wedge, Truss, Mesh, Part) are categorized under this Class

:IsA("ClassName") returns a bool which when false, will not run in the above code

Ad
Log in to vote
0
Answered by 4 years ago

if v:IsA('Part') or v:IsA('MeshPart') then

0
why am i stressing my self lmao Cyrellejheff 11 — 4y

Answer this question