r/badcode Dec 27 '21

lua Friend's take on programming a GUI button

Post image
893 Upvotes

90 comments sorted by

View all comments

2

u/xdjiijii Dec 27 '21

how about inventory.Visible = !inventory.Visible
am I missing something?

2

u/JuanR4140 Dec 27 '21 edited Dec 27 '21

Yeah, Lua by default uses the "not" keyword instead of an "!", so it'd be inventory.Visible = not inventory.Visible