I previously had a different issue solved; and the script that the individual gave me was working fine until I tried to execute another command.
I’m currently making an admin system for a game, and I’m trying to use the notification system in it.
This is what I’m currently getting when I type in the command without a valid player
This is what I would like
STARTER_GUI_LOCAL_SCRIPT
game.ReplicatedStorage.Notification.OnClientEvent:Connect(function(Type, CommandsList)
local startergui = game:GetService("StarterGui")
local text = ""
if Type == "COMMANDS" then
for _, command in pairs(CommandsList) do
text = text .. "\n"..command
end
end
startergui:SetCore("SendNotification", {
Title = "NOTIFICATION",
Text = text
})
end)
SSS_GAMEBAN_SCRIPT
elseif string.sub(Message, 1 ,8) == "/gameban" and table.find(permissions.gameban, AdminLevel) then
local Target = game.Players:FindFirstChild(string.sub(Message,10,string.len(Message)-string.len(string.sub(Message,10))-1))
if Target ~= nil then
game:GetService("DataStoreService"):GetOrderedDataStore("PermBan"):SetAsync(Target.UserId.."_GameBanned")
Player:Kick("You have been banned from the game.")
else
game.ReplicatedStorage.Notification:FireClient(Client, "COMMANDS", "Player is Invalid")
end;