Even MouseButton1Click does not work, which is causing me just all around confusion on why this button is being so difficult. I've double checked it's z index, heiarchy, and transparency which are all correct. Any help figuring this out would be appreciated <3
local Players = game:GetService("Players")
local RepS = game:GetService("ReplicatedStorage")
local LocalPlayer = Players.LocalPlayer
local playerGui = LocalPlayer.PlayerGui
local GUI = playerGui:WaitForChild("Menus").Inventory.GUI
local HUD = playerGui:WaitForChild("HUD").HUD
local itemTemplate = playerGui.Templates.ItemSlotTemplate
local invScroll = GUI.Pocket.invScroll
local itemsData = require(RepS.Shared.Data.itemData)
local getInventoryFunction = RepS:WaitForChild("remoteFunctions"):WaitForChild("getInventory")
local playerItems = getInventoryFunction:InvokeServer()
local openInvButton = HUD.MenuOptions.InventoryButton
-- Open the Inventory
openInvButton.Activated:Connect(function()
GUI.Visible = not GUI.Visible
end)
-- Initalize the Inventory
for itemName , itemData in pairs (itemsData) do
if itemData.Enabled == true then
local newItem = itemTemplate:Clone()
newItem.Visible = false
newItem.Parent = invScroll
newItem.NameButton.Text = itemName
newItem.ImageButton.Image = itemData.Image
newItem:AddTag(itemData.Class)
newItem.NameButton:AddTag("invItem")
newItem.ImageButton:AddTag("invItem")
end
end
-- Load player items
if playerItems ~= nil then
for itemName , itemData in pairs(playerItems) do
if itemsData[itemName].Enabled == true then
if itemData.uses > 0 then
local item = invScroll:FindFirstChild(itemName)
item.Visible = true
item.usesLabel.Text = "x" .. itemData.uses
item.own.Value = true
end
end
end
end```
** You are now Level 5! **
