Hello Roblox Community,
So I’ve made a script which sends a message with a Webhook ( DISCORD). Its works fine in Roblox Studio, but when I’m in my game in the normal Roblox, it doesnt send.
Here are my scripts:
This script is inside a button:
local ReportEvent = game.ReplicatedStorage.RemoteEvents.Feedback
local Debounce = false
local Players = game:GetService("Players")
script.Parent.MouseButton1Click:Connect(function()
local rate = script.Parent.Parent.RateInt.Value
local reason = script.Parent.Parent.Frame.TextBox.Text
if rate ~= nil and reason ~= nil then
if Debounce then return end
Debounce = true
script.Parent.Parent.LoadingCircle.Visible = true
wait(2)
script.Parent.Parent.done.Visible = true
script.Parent.Parent.LoadingCircle.Visible = false
wait(1)
script.Parent.Parent.done.Visible = false
script.Parent.Parent.Enabled = false
ReportEvent:FireServer(rate, reason)
wait(7)
Debounce = false
end
end)
And this is inside ServerScript Service:
local ReportEvent = game.ReplicatedStorage.RemoteEvents.Feedback
local HTTPService = game:GetService("HttpService")
local Webhook_URL = --I will not say the url xd
ReportEvent.OnServerEvent:Connect(function(plr, rate, reason)
local Data = {
["content"] = "",
["embeds"] = {{
["title"] = "**New Feedback from** ".. plr.Name .. " (" .. rate .. ")", -- title
["description"] = "**Feedback : ** " .. reason,
["type"] = "rich",
["color"] = tonumber(0xff0065), --any hex colour code
}
}}
local Data = HTTPService:JSONEncode(Data)
HTTPService:PostAsync(Webhook_URL, Data)
end)
I hope someone can help me, bye!
~ Maini
