replaced replaced replaced replaced replaced replaced replaced replaced
Why would I use this over frame.Visible = not frame.Visible? If it’s because of the tween, I may as well just make my own function.
To me, This is a bit cleaner, and This is what I would use for many frames. It’s really just your preference but is Cleaner, At least to me.
The librarization of Luau has come, This is the left-pad of Roblox. This module is really unnecessary, you have to require a whole module which defines a function just to do something you can do natively with one line Frame.Visible = not frame.Visible
i suggest adding some unique features to make this standout, as others have mentioned, this can be achieved with one line, though if your looking for a cleaner alternative, you could simply wrap the line in a function, for example:
local function toggle(guiObject: GuiObject)
guiObject.Visible = not guiObject.Visible
end
--optional variant
local function setVisibility(guiObject: GuiObject, state: boolean)
guiObject.Visible = state
end
Next time make a “print” module which, guess what! It prints something in Roblox’s own output. That’d be cleaner!
I’m struggling using the Instance class can you please help me and write a module which handles the Instance.new method?
Many thanks,