Ad
Log in to vote
2

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

Asked by 17 days ago
Edited 17 days 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 64 — 17d

1 answer

Log in to vote
3
Answered by 17 days ago
Edited 17 days 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 64 — 17d
0
both T3_MasterGamer 1736 — 17d
0
ok 666_brithday 64 — 17d
0
thx 666_brithday 64 — 17d
Ad

Answer this question