I can’t find out where I am going wrong. Everything else but the embed. When it tries to does Error (HTTP 400 (Bad Request))
I have been trying for around 2 to 3 hours no luck. So, I am asking for help before start pulling my hair out.
local ReplicatedStorage = game.ReplicatedStorage
wait(1)
local debounce = false
ReplicatedStorage.ExploitLog.OnServerEvent:Connect(function(plr,ID,reason,reason)
print("player:"..plr.Name) -- Attemped find error but nothing
print("ID:"..ID) -- Attemped find error but nothing
print("Reason:"..reason) -- Attemped find error but nothing
if debounce == false then debounce = true
for _,player in pairs(game.Players:GetPlayers()) do
if player ~= plr then
game.ReplicatedStorage.ExploitKicked:FireClient(player,"Exploiter Kicked", "Exploiter: ".. tostring(plr).."\n Reason: "..reason)
end
wait(0.1)
debounce = false
local webhook = ''
local HttpService = game:GetService("HttpService")
local data = {
["username"] = "Exploit logs",
["embeds"] = {{
["title"] = "Exploiter Kicked!",
["color"] = tonumber(0xffffff),
["fields"] = {
{
["name"] = "Exploiter Player Information:",
["value"] = "Below",
["inline"] = false
},
{
["name"] = "Exploiter Player Username:",
["value"] = plr.Name,
["inline"] = true
},
{
["name"] = "Exploiter Player ID (UserId)",
["value"] = ID.UserId,
["inline"] = true
},
{
["name"] = "Reason:",
["value"] = reason,
["inline"] = false
}
}
}
}}
local newdata1 = HttpService:JSONEncode(data)
HttpService:PostAsync(webhook, newdata1)
end end end)