local parent = script.Parent:GetChildren() for i = 1,#parent do if parent[i]:IsA("BasePart") then
Title ^^
I can't change the (for i = 1) to like 1,2 because i want it to do the same thing to the other one but it doesnt.
A Better Way To Do This Is To Use A Generic For.
local parent = script.Parent for i,v in pairs(parent:GetChildren()) -- "i" in this case is Index, "v" in this case is the object in question. if v:IsA("BasePart") then --Code end end
Hope This Helped!