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

How to have multiple condition values?

Asked by 2 years ago

So, I wanted that, when all of the values are true, something happens. But I only tried to do this with prints, so it would be easier, but for me it's not easier.

And it only prints "starting".

local ws = game.Workspace

local value1 = ws.Part1.Value
local value2 = ws.Part2.Value
local value3 = ws.Part3.Value
local value4 = ws.Part4.Value
local value5 = ws.Part5.Value

value1.Value = true
value2.Value = true

print("starting")

if value1 == true and value2 == true then
    print("both true")
end

Thank you for reading!

2 answers

Log in to vote
1
Answered by
Xapelize 2658 Moderation Voter Community Moderator
2 years ago

You meant

if value1.Value == true and value2.Value == true then

?

0
he already have the value he just need to update it Puppynniko 1059 — 2y
Ad
Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
2 years ago

is the value true in the first place if not then you need to update it and you will have to put it in a loop or it would only run once

Answer this question