-
What do you want to achieve? I want to do a suggestion GUI
-
What is the issue? Basically if i write the suggestion on roblox studio it works as you can see
(Discord)
BUT
in game it doesn’t work and it gives me this strange error when i click “Submit”
My scripts if you are interested
CLIENT
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) --I'M SURE THAT THE REMOTE EVENT IS IN REPLICATEDSTORAGE
end)
SERVER
local HttpService = game:GetService("HttpService")
local WebhookURL = "https://discordapp.com/api/webhooks.......
local function postToDS(Message)
local Data = {
["content"] = Message
}
Data = HttpService:JSONEncode(Data)
HttpService:PostAsync(WebhookURL, Data)
end
game.ReplicatedStorage.Suggest.OnServerEvent:Connect(function(Player, Suggestion)
postToDS("Suggestion from " .. Player.Name .. ": " .. Suggestion)
end)