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

What does this do exactly Frame.Visible = not Frame.Visible?

Asked by 1 year ago
Edited 1 year ago

Hi I am trying to understand Lua coding I am a beginner. What is this suppose to do?

script.Parent.Switcher.MouseButton1Click:Connect(function()
    Frame.Visible = not Frame.Visible
end)

And does it do the same as

frame.visible = false

Please let me know and please explain

0
Sorry for weird tittle spent 5 minutes trying to post due to tittle spam 666_brithday 103 — 1y

1 answer

Log in to vote
3
Answered by 1 year ago
Edited 1 year ago

not returns the opposite of a boolean (true/false).

print(not true) -- false
print(not false) -- true
0
so frame.visible = not frame.visible witch is equvlant to frame.visible = true right?? or is it frame.visible = false?? 666_brithday 103 — 1y
0
both T3_MasterGamer 2189 — 1y
0
ok 666_brithday 103 — 1y
0
thx 666_brithday 103 — 1y
Ad

Answer this question