Since people were sending this to my discord server via feedback:
You have not reached the minimum of ## characters!
I decided to make change up the system so people couldn’t send ^^ to the discord server.
Instead of that message going to the textbox I made it go to a whole different textlabel.
The old script looked like this:
local min = 10
local deb = false
script.Parent.MouseButton1Click:Connect(function()
if not deb then
deb = true
if #script.Parent.Parent.Feedback.Text >= min then
local msg = script.Parent.Parent.Feedback.Text
script.Parent.Parent.Feedback.Text = "Sending..."
local response = game.ReplicatedStorage.RemoteEvents.Feedback:InvokeServer(msg)
print("Invoked")
script.Parent.Parent.Feedback.Text = response
wait(5)
print("Wait done")
if script.Parent.Parent.Feedback.Text == response then
script.Parent.Parent.Feedback.Text = ""
end
deb = false
else
script.Parent.Parent.Feedback.Text = "You have not reached the minimum of "..min.." characters!"
wait(5)
deb = false
end
end
end)
or something like that.
Here is the new script:
local min = 10
local deb = false
script.Parent.MouseButton1Click:Connect(function()
if not deb then
deb = true
if #script.Parent.Parent.Feedback.Text >= min then
local msg = script.Parent.Parent.Feedback.Text
script.Parent.Parent.Feedback.Text = ""
script.Parent.Parent.SubmitMessage.Text = "Sending..."
local response = game.ReplicatedStorage.RemoteEvents.Feedback:InvokeServer(msg)
print("Invoked")
script.Parent.Parent.SubmitMessage.Text = response
wait(5)
print("Wait done")
if script.Parent.Parent.SubmitMessage.Text == response then
script.Parent.Parent.SubmitMessage.Text = ""
end
deb = false
else
script.Parent.Parent.Feedback.Text = ""
script.Parent.Parent.SubmitMessage.Text = "You have not reached the minimum of "..min.." characters!"
wait(5)
deb = false
end
end
end)
(this is a local script btw)
Maybe there is something wrong with this server script:
local HS = game:GetService("HttpService")
local chatService = game:GetService("Chat")
local webhookURL = "url"
local filteringAndSend = game.ReplicatedStorage.RemotesEvents.Feedback
function filteringAndSend.OnServerInvoke(plr, msg)
local filtered = chatService:FilterStringForBroadcast(msg, plr)
local payload = HS:JSONEncode({
content = filtered,
username = "Submitted by: "..plr.Name
})
HS:PostAsync(webhookURL, payload)
return "Feedback recieved!"
end
I had just recopied the webhook url and it was literally the same.
Could I use table.unpack({"You don't want to send this", "You don't want to send this either"})
and make it like this?
if script.Parent.Parent.Feedback.Text ~= table.unpack({"You don't want to send this", "You don't want to send this either"}) then
--code
end
btw here is my set up:
and a script in ServerScriptService.