#need help with this script

3 messages · Page 1 of 1 (latest)

sturdy pilot
#

Basically, I want to make all those parts affected by my code, but apparently, only one of them gets affected by it, even though they all have the same name which is "Part".

rugged kelp
# sturdy pilot Basically, I want to make all those parts affected by my code, but apparently, o...

.Part is returnin the first child that it finds with the name Part

1 - If you want something to be forever, use a while loop instead of a very large for loop (that on some point of eternity is going to end)
2 - To apply all the effects on all parts you would iterate on all the childrens of the folder:

for i, Part in Folder:GetChildren()
  if Part:IsA("Part") then -- This check can be deleted if theres no going to be anything that arae not parts
    -- Do all your things
  end
end
#

Also, use task.wait instead of wait. It is better