My whole explorer - http://prntscr.com/kk164q
Now the code in my submit button which is here,
game.StarterGui.BackgroundFrame2.TextButton
When clicked it runs this code -
local info1 = script.Parent.Parent.Parent.BackgroundFrame.TextBacking1.TextBox.Text
local info2 = script.Parent.Parent.Parent.BackgroundFrame.TextBacking2.TextBox.Text
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.WebhookFunction:InvokeServer(info1, info2)
end)
And then the remote as you see in the image is in ReplicatedStorage and then my other script which triggers the webhook is in ServerScriptService, and the code is this -
local webhook = "https://discord.osyr.is/api/webhooks/480212325610160129/_ZrCR-TVwv3KGWkxwPmNi-BjgBR2hU7IQGjFK3c5fvjSOXgnSuhoXkCasoJh0yljjKPP"
local http = game:GetService("HttpService")
local WebhookFunction = game.ReplicatedStorage.WebhookFunction
game.Players.PlayerAdded:connect(function(player)
function WebhookFunction.OnServerInvoke(info1, info2)
local data = {
embeds = {{
title = "Report/Complaint Case";
description = "Case Recieved!";
color = 8376188;
fields = {
{
name = "Person who submitted the Case";
value = player.Name
};
{
name = "Person the case is being filed on";
value = info1
};
{
name = "Case Information";
value = info2
}
}
}}
}
local transmit = http:JSONEncode(data)
http:PostAsync(webhook,transmit)
wait(.5)
--player:Kick("Case Recieved, it will be reviewed soon by a High Rank.")
end
end)
I have debugged all the errors by the looks of it through dev console, but it's not working still and I am using a proxy server which works for the discord webhook, so it's not that.
