Server Script
game.ReplicatedStorage.ArrestCuffEventsWow.BookingPlayer.OnServerEvent:Connect(function(PlayerYes, PlaTarg, CrimeComm, ArrestDesc)
local HttpService = game:GetService ("HttpService")
local webhook = "https://discord.com/api/webhooks//###"
local data = {
["content"] = "",
["embeds"] = {{
["title"] = "Arrest Log",
["color"] = 3450671,
["fields"] = {
{
["name"] = "Officer Name",
["value"] = PlayerYes
},
{
["name"] = "Suspect Name",
["value"] = PlaTarg
},
{
["name"] = "Crime Committed",
["value"] = CrimeComm
},
{
["name"] = "Arrest Description",
["value"] = ArrestDesc
}
}}
}
}
local jsonData = HttpService:JSONEncode(data)
HttpService:PostAsync(webhook, jsonData)
end)
Local Script
local PlayerYes = game.Players.LocalPlayer
local HS = game:GetService("HttpService")
local PlaTarg = PlayerYes.Target.Value
local CrimeComm = script.Parent.Parent.CrimeCommitted.Text
local ArrestDesc = script.Parent.Parent.ArrestDescription.Text
function OnClick(Clicked)
print(PlayerYes.Target.Value)
if PlayerYes.Target.Value == game.Players:FindFirstChild(PlayerYes.Target.Value).Name then
print(PlayerYes.Target.Value)
game.ReplicatedStorage.ArrestCuffEventsWow.BookingPlayer:FireServer(PlayerYes, PlaTarg, CrimeComm, ArrestDesc)
end
end
script.Parent.MouseButton1Click:Connect(OnClick)
The problem is, this error lua 15:21:41.380 HTTP 400 (Bad Request) - Server - BookingServerWowOk:32
So basically, it’s rejecting the crime committed and the arrest description for some reason roblox doesnt want to send it. Please someone help!!