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

Question about "or" operator?

Asked by
NykoVania 231 Moderation Voter
2 years ago

If I make the first argument nil, will the function use it or will it use Torso?

local function RandomFunction(Pos,FollowPart)
    local RandomVariable = Pos or FollowPart
end

RandomFunction(nil,"Torso")

1 answer

Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
2 years ago

It will use the string

0
Thank you NykoVania 231 — 2y
Ad

Answer this question