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

I was watching a youtube video and came across this?

Asked by 5 years ago
Edited 5 years ago
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

Log in to vote
0
Answered by
cegberry 432 Moderation Voter
5 years ago
Edited 5 years ago

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

0
Thank you for your answer! :D ISkyLordDoge 37 — 5y
0
Since your new, you should know if someone ever gives a correct answer, you can mark their answer as correct cegberry 432 — 5y
0
Thank you for tips. :) ISkyLordDoge 37 — 5y
Ad

Answer this question