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

If statement comes back with an error? [SOLVED]

Asked by 4 years ago
Edited 4 years ago

I'm trying to script a GUI to popup once a GUIs visibility = false. But when I try to do "if script.parent.parent.parent.Menu.Visibility = false then" it shows the equal sign as an error? I don't quite understand this because nothing seems wrong with it to me.

2 answers

Log in to vote
0
Answered by 4 years ago

when you use if and you wan't it to check if it is the same as something else you use 2 = , here take an example

local Testvalue = 10
if Testvalue == 9 then
    print("Testvalue is 9")
elseif Testvalue == 10 then
    print("Testvalue is not 9 it is 10")
end
Ad
Log in to vote
1
Answered by
iOwn_You 543 Moderation Voter
4 years ago

Its not visiblity, its Visible and also you should use 2 equal signs ==

If constructors

0
I shave a new problem now, let me explain what I'm making first to better help you understand. So I'm making a menu with a play button that leads into a frame that is a loading screen. But the problem is, I have the frame for the loading screen checked false for visible but it still pops up before the menu? I have no scripts telling it to be visible at game start. rylanb13 2 — 4y

Answer this question