Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

3 comments

1

You're looking for the 'and' keyword.

1

Replace the + signs with and lol

0

Lol...

1 answer

✓ Accepted answer

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

1 comment

0

Never mind it's working!

This discussion is preserved as it was. New answers, comments, and votes are closed.