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

Why is there an error here in my script?

Here is my script:

if Light1.BrickColor = ("Bright Yellow")
   Light2.BrickColor = ("Bright Yellow")
   Light3.BrickColor = ("Bright Yellow") then
Door1.Position = -49, 6.99, 8.5
Door2.Position = -54, 6.99, 8.5

end

The error is in the first line. It says, " 'then' expected near '=' "

Help?

Thank you!

1 answer

if Light1.BrickColor == ("Bright Yellow")and
   Light2.BrickColor == ("Bright Yellow")and
   Light3.BrickColor == ("Bright Yellow") then
Door1.Position = Vector3.new(-49, 6.99, 8.5)
Door2.Position = Vector3.new(-54, 6.99, 8.5)

end

2 comments

0

You forgot about the 'Vector3' for the Positions. :P

0

I only even looked at the condition since that was all he asked about.

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