SuggestionManager Script - (ServerScriptStorage)
local HttpService = game:GetService("HttpService") local WebhookURL = "https:/wlSrdTP6FvqGPcwE7QZuidoaHoef3nV0iz_-HZkc6-H6U7b0En" --<<--WEBHOOK URL HERE local function postToDiscord(Message) local Data = { ["content"] = Message } Data = HttpService:JSONEncode(Data) HttpService:PostAsync(WebhookURL, Data) end game.ReplicatedStorage.Suggest.OnServerEvent:Connect(function(Player, Suggestion) postToDiscord("Suggestion from " .. Player.Name .. ": " .. Suggestion) end)
SuggestionScript - (StarterGui)
local Player = game.Players.LocalPlayer local ToggleButton = script.Parent.ToggleButton local SuggestionFrame = script.Parent.SuggestionFrame local SuggestionBox = SuggestionFrame.SuggestionBox local SubmitButton = SuggestionFrame.SubmitButton ToggleButton.MouseButton1Click:Connect(function() if SuggestionFrame.Visible == true then SuggestionFrame.Visible = false else SuggestionFrame.Visible = true end end) SubmitButton.MouseButton1Click:Connect(function() local Suggestion = SuggestionBox.Text game.ReplicatedStorage.Suggest:FireServer(Suggestion) end)
The Map for the GUI is
StarterGUI |_ SuggestionGUI |_ SuggestionScript Suggestion Frame _ |_ SubmitButton SuggestionBox
You did not use a debounce.
A debounce is used for that occasion.
local Debounce = false local Player = game.Players.LocalPlayer local ToggleButton = script.Parent.ToggleButton local SuggestionFrame = script.Parent.SuggestionFrame local SuggestionBox = SuggestionFrame.SuggestionBox local SubmitButton = SuggestionFrame.SubmitButton ToggleButton.MouseButton1Click:Connect(function() if SuggestionFrame.Visible == true then SuggestionFrame.Visible = false else SuggestionFrame.Visible = true end end) SubmitButton.MouseButton1Click:Connect(function() if Debounce == false then Debounce = true local Suggestion = SuggestionBox.Text game.ReplicatedStorage.Suggest:FireServer(Suggestion) wait(5) -- how much time you want to debounce Debounce = false end end)
I hope this helps.