I keep getting the error “tried to concentate instance with string” and I have no idea why. I’m just trying to make it so if a person sends a report in it gets sent to my webhook. Heres my GUI script:
local reportedRecently = false
local Players = game:GetService(“Players”)
local client = Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
local reportreason = script.Parent.Parent.reportreason
local plrtoreport = script.Parent.Parent.reportname
local plr = game.Players.LocalPlayer
if reportreason.Text ~= "" and plrtoreport.Text ~= "" and reportedRecently == false then
game.ReplicatedStorage.Moderation.reportUser:FireServer(client, plrtoreport, reportreason)
reportedRecently = true
script.Parent.Text = "Reported!"
end
end)
after that it sends to event that sends to a script that sends to webhook:
game.ReplicatedStorage.Moderation.reportUser.OnServerEvent:Connect(function(client, plrtoreport, reportreason)
local http = game:GetService("HttpService")
local Data = {
["content"] = client.Name.. " has reported " ..plrtoreport.. " for " ..reportreason
}
Data = http:JSONEncode(Data)
http:PostAsync("", Data)
end)
but I have no idea why it’s not working