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

I was watching a youtube video and came across this?

local prev
local parts = script.Parent:GetChildren()

for i = 1, #parts do
      if ((#parts[i].ClassName == 'Part')) then
      
      end
end

Question : At line-5 when the if statement starts, I was looking at ((#parts[i].ClassName..)) had 2 '(' over the starts and ends of the line. Why is this?

1 answer

✓ Accepted answer

They are not important, they are just mostly used for readability purposes, some developers use them if there are two or more conditions needed to be checked in a single if statement

3 comments

0

Thank you for your answer! :D

0

Since your new, you should know if someone ever gives a correct answer, you can mark their answer as correct

0

Thank you for tips. :)

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