Hello devs, I am having a slight issue with a Roblox to discord webhook. The script won’t allow me to have 3 I guess you could say ‘Custom’ strings what I mean by that is where you have a string then you put ‘…’ around a localised word example: ‘“Player”…Player.Name…“has been hacking”’
Here is my script,
local remote = game.ReplicatedStorage:WaitForChild("Application")
local http = game:GetService("HttpService")
local webhook = "" -- Webhook here
remote.OnServerEvent:Connect(function(player,q1,q2,q3,q4,q5,q6,q7,q8)
print("Remote fired")
local data = {
["content"] = '',
["embeds"] = {{
["title"] = player.Name.."'s Application",
["description"] = "Answers,"..q1..q2..q3..q4..q5..q6..q7..q8,
["color"] = 15636761,
["thumbnail"] = {url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..player.Name},
}}
}
data = http:JSONEncode(data)
http:PostAsync(webhook, data)
end)
If anyone has any suggestions on how to fix it please do let me know! (The line ‘[“description”] = “Answers,”…q1…q2…q3…q4…q5…q6…q7…q8,’ doesn’t work)
This is the script thats firing the remote function.
local remote = game.ReplicatedStorage:WaitForChild("Application")
script.Parent.MouseButton1Click:Connect(function()
local q1 = script.Parent.Parent.Question1
local q2 = script.Parent.Parent.Question2
local q3 = script.Parent.Parent.Question3
local q4 = script.Parent.Parent.Question4
local q5 = script.Parent.Parent.Question5
local q6 = script.Parent.Parent.Question6
local q7 = script.Parent.Parent.Question7
local q8 = script.Parent.Parent.Question8
script.Parent.Parent:TweenPosition(UDim2.new(0.28,0,1.2,0))
wait(2)
script.Parent.Parent.Parent.thanks:TweenPosition(UDim2.new(0.281,0,0.218,1))
remote:FireServer(q1,q2,q3,q4,q5,q6,q7,q8)
wait(2)
for Iteration = 10, 1, -1 do
script.Parent.Parent.Parent.thanks.TextButton.Text = Iteration
task.wait(1)
end
game.Players.LocalPlayer:Kick("[Kanda System] Thank you for applying, you will be contacted within 5-7 days.")
end)