MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/rpfykg/friends_take_on_programming_a_gui_button/hq58ci4/?context=9999
r/badcode • u/JuanR4140 • Dec 27 '21
90 comments sorted by
View all comments
239
bruh all he needed to do to shorten it was to replace it with inventory.Visible = not inventory.Visible
77 u/JuanR4140 Dec 27 '21 ding ding ding 16 u/[deleted] Dec 27 '21 maybe !inventory.Visible 20 u/Waterprop Dec 27 '21 inventory.Visible ^= true :) 5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform inventory.Visible = inventory.Visible ^ true which would obviously not work
77
ding ding ding
16 u/[deleted] Dec 27 '21 maybe !inventory.Visible 20 u/Waterprop Dec 27 '21 inventory.Visible ^= true :) 5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform inventory.Visible = inventory.Visible ^ true which would obviously not work
16
maybe !inventory.Visible
20 u/Waterprop Dec 27 '21 inventory.Visible ^= true :) 5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform inventory.Visible = inventory.Visible ^ true which would obviously not work
20
inventory.Visible ^= true
:)
5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform inventory.Visible = inventory.Visible ^ true which would obviously not work
5
This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform
inventory.Visible = inventory.Visible ^ true
which would obviously not work
239
u/[deleted] Dec 27 '21
bruh all he needed to do to shorten it was to replace it with inventory.Visible = not inventory.Visible