when i try to use my new ban system it says the user is unknown
local button = script.Parent
local id = button.Parent.TextID.Text
local numberID = tonumber(id)
local reason = button.parent.TextReason.Text
local privreason = button.parent.PrivTextReason.Text
local duration = button.parent.TextDuration.Text
local AltBan = button.parent.TextAltban.Text
local Players = game:GetService("Players")
button.MouseButton1Click:Connect(function()
if numberID then
Players:BanAsync({
UserIds = {numberID},
ApplyToUniverse = true,
Duration = duration,
DisplayReason = reason,
PrivateReason = privreason,
ExcludeAltAccounts = AltBan,
})
print("Banned ".. id "time:".. duration "reason:".. reason "priv reason".. privreason "alt ban:".. AltBan)
else
local numberedID = Players:GetUserIdFromNameAsync(id)
Players:BanAsync({
UserIds = {numberedID},
ApplyToUniverse = true,
Duration = duration,
DisplayReason = reason,
PrivateReason = privreason,
ExcludeAltAccounts = AltBan,
})
print("Banned ".. id "time:".. duration "reason:".. reason "priv reason".. privreason "alt ban:".. AltBan)
end
end)
any solution? did i do something wrong?
** You are now Level 2! **