Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a feedback system?

So I started making a new webhook system by combining all of your answers, But there is a problem, it posts with the player's name, however, the text feedback here is displayed, here is the script.

local url = "oh my god no peekers"
local http = game:GetService("HttpService")

game:GetService("ReplicatedStorage").FeedBack.OnServerEvent:Connect(function(player)
	local info = {
		["username"] = player.Name,
		["content"] = game.StarterGui.FeedbackGui.FeedbackFrame.FeedbackHere.Text
	}
	local newdata = http:JSONEncode(info)
    http:PostAsync(url,newdata)
end)

1 answer

Your best bet is to use a remote event and have the webhook on the server as an exploiter could easily grab the webook and spam it if it was stored locally. Here's an example

Client script:

script.Parent.MouseButton1Click:Connect(function()
    local data = { 
        ["username"] = "FeedbackBot";  -- Name you want the webhook to have.
        ["content"] = game:GetService("Players").LocalPlayer.Name.." has said "..script.Parent.Parent.FeedbackHere.Text; -- Text
    }

   game:GetService("ReplicatedStorage").FeedBack:FireServer(game:GetService("HttpService"):JSONEncode(data)); -- Send the data to the server.
end);

Server script:


local url = "webhook";
game:GetService("ReplicatedStorage").FeedBack.OnServerEvent:Connect(function(Player, info)
	game:GetService("HttpService"):PostAsync(url, info);
end);

4 comments

0

it didnt work for me

0

Forgot to mention that you have to enable httpservice. Check https://developer.roblox.com/en-us/api-reference/class/HttpService#enabling-http-requests

0

I did that

0

What's the error?

This discussion is preserved as it was. New answers, comments, and votes are closed.