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

Why is there an error here in my script?

Asked by 9 years ago

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

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago
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
0
You forgot about the 'Vector3' for the Positions. :P TheeDeathCaster 2368 — 9y
0
I only even looked at the condition since that was all he asked about. 1waffle1 2908 — 9y
Ad

Answer this question