I am making a Discord Webhook for the chat in Roblox. So, whenever somebody talks in the game, it announces it in this separate channel on Discord. I've tested it out several times in Roblox Studio and it said in the Discord chat what I said in Roblox Studio, which is amazing! I then save the game and go to the actual game and test it out, but whenever I say something in the game, it doesn't appear in the Discord channel. I thought it didn't save, so I went back to Roblox Studio and it did save. I then added a model to make sure, left then rejoined and the model was there. I've tried several different ways. The script is below. Please help!
local url = WEBHOOK URL (not saying the actual webhook url here)
local https = game:GetService("HttpService")
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
local data = {
["embeds"] = {{
color = 000000,
title = "Training Chat Bot",
fields = {
{
name = player.Name,
value = msg
}
}
}}
}
local newdata = https:JSONEncode(data)
https:PostAsync(url,newdata)
end)
end)

3 comments
Note; You must have HttpsRequests turned on in studio.
It didn't work, but I still accepted it!
Cheers, can you elaborate? Are you sure you have HttpsRequests on in the studio and are you putting the URL in the right place?