--[[
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)
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.
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.
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.
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!