Discord Webhook only sending while in studio

Hello, my script works perfectly fine but just doesn’t send at all when I join the actual game.

Any idea why? I can’t figure it out.

LocalScript inside StarerGui → FeedbackMenu → feedbackFrame

--[[
Showing Position : 0.385, 0,0.242, 0
Hiding (Low) Position : 0.385, 0,1.1, 0
]]

local Frame = script.Parent
local infoHolder = Frame.infoHolder
local dismissButton = Frame.DismissButton
local sendbutton = Frame.SendButton
local subtitle = Frame.Subtitle
local title = Frame.Title

Frame.DismissButton.MouseButton1Click:Connect(function()
	Frame:TweenPosition(UDim2.new(0.385, 0,1.1, 0))
end)

Frame.SendButton.MouseButton1Click:Connect(function()
	if infoHolder.Text ~= "" then
		game:GetService("ReplicatedStorage"):WaitForChild("SendFeedback"):FireServer(infoHolder.Text)
		infoHolder.Text = ""
	end
	Frame:TweenPosition(UDim2.new(0.385, 0,1.1, 0))
end)

ServerScript in ServerSciptService

local webhook = "**private**"

local repStorage = game:GetService("ReplicatedStorage")
local event = repStorage:WaitForChild("SendFeedback")
local http = game:GetService("HttpService")
local GameName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name


event.OnServerEvent:Connect(function(person,text)
	local datatosend =
		{
			["content"] = "",
			["embeds"] = {{
				["title"]="Feedback / Report",
				["description"]="Feedback for : "..GameName,
				["type"]="rich",
				["color"]=tonumber(0x00ffff),
				["fields"]={
					{
						["name"]="UserID: "..person.UserId.." (".. person.Name..")",
						["value"]="Message : **"..text.."**",
						["inline"]=true
					}
				}
			}
			}
		}

	local encode = http:JSONEncode(datatosend)
	http:PostAsync(webhook,encode)
end)



1 Like

Did you enable HTTP Requests ?

I’m pretty sure roblox or discord has blocked sending requests from in-games if you don’t have an api or something. If you just search up how to make a webhook work in 2022 roblox maybe you could find something. But for now you can’t send webhooks from games just studio.

This article might help you:

1 Like

Yes, they have always been turned on.

Discord blocked Roblox’s user agent so you need to issue the webhook requests through a proxy service.

3 Likes

Ye. In studio it likes runs off your local PC IP or whatnot whereas in game it is from the Roblox User Agent so it comes from their system and not your ends system like in studio.

Figured that one out now yeah.

I have now been using Guilded (Roblox’s Rip-Off Discord) for webhooks. A pain in the butt but I guess I have to do what I need to for feedback and reports.

It really is a pain. I just ended up moving to using a proxy because it is so annoying using guilded as well. :slight_smile:

1 Like

Guilded works fine yeah, but there are also good proxy services out there that don’t really require anything. I think the easiest one to date if you don’t like setting up your own proxy would be Hyra’s webhook proxy, which just requires you to change the URL of the webhook slightly.

By all means though, if you’d rather use Guilded and it works for you, I’d recommend that!

Ye. I use the ‘hooks . hyra . io’ proxy cause I can’t be bothered to keep opening guilded. Guilded is a good other option to it but it is a pain. :slight_smile:

This is amazing! Thank you so much, I hate Guilded. This works perfectly. Cannot express how happy I am to see this.

2 Likes

Was having issues, thought it was my script or an issue with roblox, works well, thank you.

2 Likes