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

What is the "More Than" Math command?

Asked by
IcyEvil 260 Moderation Voter
8 years ago

In my plugin I need to check if there is more then one of something, and <1 does not work...

What is it..?

1 answer

Log in to vote
1
Answered by 8 years ago

This is how you compare number values:

  • < = smaller than
  • > = bigger than
  • <= = smaller than or equal to
  • >= = bigger than or equal to

So:

local children = game.Workspace:GetChildren()

if #children > 1 then
    -- code
end

Hope I helped :)

0
Thank you, and Yes you did. IcyEvil 260 — 8y
Ad

Answer this question