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.

01local url = "oh my god no peekers"
02local http = game:GetService("HttpService")
03 
04game:GetService("ReplicatedStorage").FeedBack.OnServerEvent:Connect(function(player)
05    local info = {
06        ["username"] = player.Name,
07        ["content"] = game.StarterGui.FeedbackGui.FeedbackFrame.FeedbackHere.Text
08    }
09    local newdata = http:JSONEncode(info)
10    http:PostAsync(url,newdata)
11end)

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:

1script.Parent.MouseButton1Click:Connect(function()
2    local data = {
3        ["username"] = "FeedbackBot"-- Name you want the webhook to have.
4        ["content"] = game:GetService("Players").LocalPlayer.Name.." has said "..script.Parent.Parent.FeedbackHere.Text; -- Text
5    }
6 
7   game:GetService("ReplicatedStorage").FeedBack:FireServer(game:GetService("HttpService"):JSONEncode(data)); -- Send the data to the server.
8end);

Server script:

1local url = "webhook";
2game:GetService("ReplicatedStorage").FeedBack.OnServerEvent:Connect(function(Player, info)
3    game:GetService("HttpService"):PostAsync(url, info);
4end);
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