I have a made a GUI in-game that players can use to give me feedback which is supposed to be sent to a Discord server but that doesn’t happen.
There are no errors in the output and HttpEnabled is true.
LocalScript:
--//Variables\\--
local gui = script.Parent
local frame = gui.Frame
local contimg = gui.Controls
local closebtn = contimg.Close
local contbtn = frame.ControlsBtn
local telebtn = frame:WaitForChild("TeleBtn")
local remotes = game.ReplicatedStorage:WaitForChild("RemoteEvents")
local teleplayerRemote = remotes:WaitForChild("TeleportPlayer")
local player = game.Players.LocalPlayer
local noblimpRemote = remotes:WaitForChild("NoBlimp")
local message = gui:WaitForChild("Message")
local canTeleport = gui:WaitForChild("CanTeleport")
local damageRemote = remotes:WaitForChild("PlayerTakenDamage")
local feedbackBtn = frame:WaitForChild("FeedbackBtn")
contbtn.MouseButton1Down:connect(function()
contimg:TweenPosition(UDim2.new(0.257, 0, 0.249, 0))
end)
closebtn.MouseButton1Down:connect(function()
contimg:TweenPosition(UDim2.new(0.257, 0, -1, 0))
end)
--//Functions\\--
local function teleport()
teleplayerRemote:FireServer(player)
end
telebtn.MouseButton1Down:connect(function()
if canTeleport.Value == true then
canTeleport.Value = false
teleport()
else
telebtn.Text = "You can't teleport right now."
wait(4)
telebtn.Text = "Teleport To Blimp"
end
end)
noblimpRemote.OnClientEvent:connect(function()
message.Text = "No blimp found"
message.Visible = true
wait(3)
message.Visible = false
message.Text = ""
end)
damageRemote.OnClientEvent:connect(function()
if canTeleport.Value == true then
canTeleport.Value = false
message.Text = "You cannot teleport when in combat, coward"
message.Visible = true
wait(3)
message.Visible = false
message.Text = ""
end
end)
--//Feedback\\--
--//Variables\\--
local feedbackFrame = gui:WaitForChild("FeedbackFrame")
local sendButton = feedbackFrame:WaitForChild("SendButton")
local feedbackBox = feedbackFrame:WaitForChild("FeedbackBox")
local exit = feedbackFrame:WaitForChild("Exit")
local http = game:GetService("HttpService")
local sendFeedbackRemote = remotes:WaitForChild("SendFeedback")
--//Functions\\--
local function sendFeedback()
if not feedbackBox.Text == "Please type your feedback here" or not "" then
sendFeedbackRemote:FireServer(player,feedbackBox)
else
feedbackBox.Text = "You didn't type anything..."
end
end
local function openGui()
feedbackFrame:TweenPosition(UDim2.new(0.359, 0 ,0.232, 0))
end
local function closeGui()
feedbackFrame:TweenPosition(UDim2.new(0.359, 0 ,-1, 0))
end
feedbackBtn.MouseButton1Down:connect(function()
openGui()
end)
exit.MouseButton1Down:connect(function()
closeGui()
end)
sendButton.MouseButton1Down:connect(function()
sendFeedback()
sendButton.Visible = false
feedbackBox.Text = "Thank you for giving your feedback!"
wait(3)
feedbackBox.Text = "Please type feedback here"
wait(120)
sendButton.Visible = true
end)
Server Script (Inside ServerScriptService):
--//Made by shish_kebab4\\--
--//Variables\\--
local remotes = game.ReplicatedStorage:WaitForChild("RemoteEvents")
local sendFeedbackRemote = remotes:WaitForChild("SendFeedback")
local http = game:GetService("HttpService")
local url = ""
--//Function\\--
sendFeedbackRemote.OnServerEvent:connect(function()
local Data = {
["content"] = "hello"
}
local newData = http:JSONEncode(Data)
http:PostAsync(url, newData)
end)