if script.Parent.Parent.Door.CanCollide = true then
It shows that = is red, I don't get it and I need help with it.
if script.Parent.Parent.Door.CanCollide = true then
It shows that = is red, I don't get it and I need help with it.
When you are making an if statement and want an equal condition, then you would have to use ==. For example:
if script.Parent.Parent.Door.CanCollide == true then
Thank you
Please press accept answered. Thanks!
^^^^ This answer is the better answer ^^^^
Thanks MrLonely1221!
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Please accept one of the answers below or put [ANSWERED] so we know that this question is answered. With out doing so we would come here and try to answer a question that is already answered.
The reason is because its an "if" statement. writing one equal sign means you are trying to change the value. In an if statement u must use two equal signs like so: if script.Parent.Parent.Door.CanCollide == true then
https://scriptinghelpers.org/questions/12025/what-is-the-difference-between-if-string-then-end-and-if-string-nil-then-end