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

How do I print a Bool Value?

Asked by 4 years ago
Edited 4 years ago
print(game.ServerStorage.BoolValue.Bool)

This is not that much of an important question I think, but I would like to know as this could possibly help with bool values in the future.

The bool at the end of the code is what I named the value.

My tutorial claims that this is the proper way to do it and that it should print either true or false (In this case false as that is what I set it to.

Instead of printing false, it instead just says that BoolValue is not a member of the server storage.

When I remove BoolValue, It just prints Bool.

1 answer

Log in to vote
2
Answered by 4 years ago

Try adding .Value right after Bool, that should give you the value of the boolvalue instead of the name.

0
I edited this actually because i wrote it wrong. saulty11 17 — 4y
0
This is useful though I just had to remove BoolValue. saulty11 17 — 4y
0
so you have a BoolValue named bool under serverstorage? So you access the bool itself with ServerStorage.Bool, and then you access the value with ServerStorage.Bool.Value doggybite1 100 — 4y
Ad

Answer this question