How would I make a script, that waits 100 seconds, but also if only 1 person has an ingame boolvalue true, will skip the rest of the time, or if all the players boolvalues = false?
COMMUNITY QUESTION
Help? I don't know how I would do this.
1 answer
Assuming the BoolValue Object is stored under Backpack in the Player that you want to run this test for:
wait(100) --This function yields the current thread for however many seconds you put in
player = game.Players["NameOfPlayerHere"]
if player.Backpack["NameOfBoolValueHere"].Value then
--It's true! :)
else
--It's false! :(
end
Notice that there are various ways to write a truth test for boolean data types in Lua, namely:
if value then
if value == true then
if value == 1 then
if value ~= false then
if value ~= 0 then
But, personally I think if value then is the most elegant ;)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I need it to wait 100 seconds, but also if only one players BoolValue == true, then it will skip the rest of the time. This really doesn't help, sorry :(
He's giving you a template on how to write it yourself. It doesn't help you learn if you're hand-given completed code like a toddler. Apply what he's saying to your problem and use your human intellect to create code.
I don't agree with how zMatrix worded it, but he is right - Scripting Helpers is about helping people to put scripts together, not scripting for them! I may post another answer a bit later that answers more of your question though.