Problem with UI Script

Hello, I’m currently in the process of making a notifications module to publish on the platform. The main actions are complete, however, the audit log zone (where every notification from each user on the server shows up) can only be accessed by staff. I tested my script and I don’t find anything wrong with it? Any help?

Client script:

local players = game:GetService("Players")
local repS = game:GetService("ReplicatedStorage")

local notifServ = repS:WaitForChild("NotifierService")
local admins = require(script.Admins)
local auditLogZone = notifServ.UI.AuditLogZone

local auditBut = auditLogZone.AuditButton
local dropup = auditLogZone.Dropup

for _, player in players:GetPlayers() do
    if admins[player.UserId] then
        local clone = auditLogZone:Clone()
        clone.Parent = player.PlayerGui
    end
end

auditBut.MouseButton1Click:Connect(function()
    dropup.Visible = not dropup.Visible
end)

Module script with all admins inside Client script:

return {
    4083725238
}

Oh, after the second edit, I think I see your problem. You’re trying to read the list of admins as a dictionary, but the module is returning a table. Change it to something like this:

return {
    [4083725238] = true
}

I just tried it. Thanks, it worked :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.