How would you reverse a variable value?
Currently im trying to create a function that can be called without inputting a value or boolean.
function GridUi:ToggleInventory()
local StoredValue = false
if StoredValue == true then
GridPack.GuiElement.Visible = true
elseif StoredValue == false then
GridPack.GuiElement.Visible = false
end
end
The reason im trying to do this is so I can have a toggle instead of hold with UIS
UserInputService.InputBegan:Connect(function(Input, IsTyping, GPE)
if IsTyping == true or GPE == true then return end
Maid:GiveTask(task.spawn(function()
if Input.KeyCode == Enum.KeyCode.G then
GridModule.ToggleInventory() -- Function just mentioned
end
end))
end)
DUDE HELP!