-
What do you want to achieve?
I want the open inventory GUI to keep working even after you die. -
What is the issue?
The button GUI stops working after death. -
What solutions have you tried so far?
I searched up for solutions but didn’t find any.
Local Script:
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local mainInven = playerGui:WaitForChild("Inventory")
local openInventory = mainInven:WaitForChild("OpenInventory")
local inventoryGui = mainInven:WaitForChild("InventoryGui")
local openInventoryGui = mainInven:WaitForChild("OpenInventory")
openInventoryGui.TextButton.Activated:Connect(function()
if inventoryGui.Active == true then
inventoryGui.Visible = false
inventoryGui.Active = false
openInventoryGui.TextButton.Text = "Open Inventory"
elseif inventoryGui.Active == false then
inventoryGui.Visible = true
inventoryGui.Active = true
openInventoryGui.TextButton.Text = "Close Inventory"
end
end)