Hey, I just wanted to know if anyone is familiar with Basic Admin Essentials remote events and etc. I’m basically trying to make it so that once a Notif has been clicked by one admin, it clears the notif for every other admin, as currently it only clears it for one. I only want it to clear the actual notification, not any other notifications.
This is utilized for my PTS system, so when someone says !PTS for example, it creates the notification on the bottom right corner, an admin clicks and it TPs which works perfectly fine, it’s just the clearing part. Currently I’m doing it like this which just doesn’t work at all, and I know is 100% wrong.
local Data = {...}
if Data[1] == "Notification Transfer" then
if Data[2][1] == "Support" then
local RequestingPlayerName = Data[2][2]
local RequestId = Data[2][3]
if not RequestId or not activePTSRequests[RequestId] then
remoteEvent:FireClient(AdminPlayer, 'Hint', 'PTS System', 'This request has already been handled or is no longer valid.')
return
end
local RequestingPlayer = activePTSRequests[RequestId].player
if RequestingPlayer and RequestingPlayer.Parent and RequestingPlayer.Backpack and
RequestingPlayer.Backpack.PTS and RequestingPlayer.Backpack.PTS.Value == true then
RequestingPlayer.Backpack.PTS.Value = false
if AdminPlayer.Character and AdminPlayer.Character:FindFirstChild("HumanoidRootPart") and
RequestingPlayer.Character and RequestingPlayer.Character:FindFirstChild("HumanoidRootPart") then
AdminPlayer.Character.HumanoidRootPart.CFrame = RequestingPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5) * CFrame.Angles(0, math.pi, 0)
end
activePTSRequests[RequestId] = nil
for _, player in pairs(playerService:GetPlayers()) do
local PlayerPermission = returnPermissions(player)
if PlayerPermission > 0 and player ~= AdminPlayer then
remoteEvent:FireClient(player, 'Clear', RequestId)
end
end
remoteEvent:FireClient(RequestingPlayer, 'Hint', 'PTS System', AdminPlayer.Name .. ' is assisting you.')
remoteEvent:FireClient(AdminPlayer, 'Hint', 'PTS System', 'You are now assisting ' .. RequestingPlayerName .. '.')
else
activePTSRequests[RequestId] = nil
remoteEvent:FireClient(AdminPlayer, 'Hint', 'PTS System', 'This request has already been handled or the player has left.')
end
end
end
end)
playerService.PlayerRemoving:Connect(function(player)
for requestId, requestData in pairs(activePTSRequests) do
if requestData.player == player then
for _, adminPlayer in pairs(playerService:GetPlayers()) do
local PlayerPermission = returnPermissions(adminPlayer)
if PlayerPermission > 0 then
remoteEvent:FireClient(adminPlayer, 'Clear', requestId)
end
end
activePTSRequests[requestId] = nil
break
end
end
end)
Any help would be greatly appreciated!