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

2 If-then statements in one if-then statements? (If that makes sense)

Asked by 3 years ago
Edited 3 years ago

Hi! Like the last post, I'm making a Five Nights At Freddy's game and I'm making if-then statements like this:

if game.Workspace.TaskClick3.BrickColor== BrickColor.new("Really red") + game.Workspace.TaskClick2.BrickColor== BrickColor.new("Really red") + game.Workspace.TaskClick.BrickColor== BrickColor.new("Really red") then
    game.Workspace.Door1.Transparency = 0
end

Is this possible?

1
You're looking for the 'and' keyword. Ziffixture 6913 — 3y
1
Replace the + signs with and lol LeedleLeeRocket 1257 — 3y
0
Lol... Ziffixture 6913 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

The first thing you're doing wrong is right here, if game.Workspace.TaskClick3.BrickColor== BrickColor.new("Really red") + game.Workspace.TaskClick2.BrickColor== BrickColor.new("Really red") + game.Workspace.TaskClick.BrickColor== BrickColor.new("Really red") then you would use and not + so here would be the updated script if game.Workspace.TaskClick3.BrickColor== BrickColor.new("Really red") and game.Workspace.TaskClick2.BrickColor== BrickColor.new("Really red") and game.Workspace.TaskClick.BrickColor== BrickColor.new("Really red") then

0
Never mind it's working! YoungsterJeremy1 6 — 3y
Ad

Answer this question