Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a feedback system?

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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);
0
it didnt work for me KamKam_AJHasBeenBan 37 — 5y
0
Forgot to mention that you have to enable httpservice. Check https://developer.roblox.com/en-us/api-reference/class/HttpService#enabling-http-requests string_byte 46 — 5y
0
I did that KamKam_AJHasBeenBan 37 — 5y
0
What's the error? string_byte 46 — 5y
Ad

Answer this question