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

Attempt to compare boolean and number..?

Asked by 4 years ago
Edited 4 years ago

Hello. I don't know why, but this simple script is having trouble.

plrAmount = #game.Players:GetChildren()
if not plrAmount >= 8 then
    -- yada yada yada
end

Workspace.Boards.Screen.Leaderboard.Holder.Script:2: attempt to compare number and boolean

2 answers

Log in to vote
2
Answered by 4 years ago
plrAmount = #game.Players:GetChildren()
if not (plrAmount >= 8) then
    -- yada yada yada
end
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You not need the not in the if statement.

Here are some examples:

x >= y -> x is greater or equal to y.

x <= y -> x is less or equal to y.

x == y -> x is equal to y.

x < y -> x is less than y.

x > y -> x is greater than y.

0
That doesnt answer my question, does it? Dan_PanMan 227 — 4y
0
Your question is not constructive. You left .....? at the end, which could mean so many things. Brandon1881 721 — 4y

Answer this question