I’ve been trying to make it so that the textboxes text will go inside the webhook when I send it. However I’ve tried numerous things such as values as well. I cannot get it to work.
Basically you would enter the suspect’s name into the text box and then the web hook would grab the text boxes text and then send it.
E.G:
["description"] = "Username of officer: "..script.Parent.Parent.Parent.Parent.Parent.Name.." \n Username of offender: "..script.Parent.Textbox.Text.." ",
local HttpService = game:GetService("HttpService")
local webhook = "WEBHOOK"
function warning()
local data = {
["embeds"] = {
{
["color"] = 0000,
["title"] = "Drivers License Warning issued",
["description"] = "Username of officer: "..script.Parent.Parent.Parent.Parent.Parent.Name.." \n Username of offender: ".." ",
["fields"] = {}
}
}
}
local newdata = HttpService:JSONEncode(data)
HttpService:PostAsync(webhook, newdata)
end
script.Parent.MouseButton1Click:Connect(function()
print("Hello")
warning()
end)