varjoy
(variable)
May 16, 2020, 2:48am
#1
No idea what’s causing this, I don’t know if it’s a bug itself, code:
local function SendEmbedMessage(Title,Message,Description)
local Msg = {
['content'] = "",
['embeds'] = {{
["title"] = "**Game notification.**",
["description"] = 'System',
["type"] = 'rich',
["color"] = tonumber(0xffffff),
["fields"] = {
{
["name"] = "__varjoy system__",
["value"] = Description,
["inline"] = true
},
}
}}
}
HttpsService:PostAsync(HttpsService:JSONEncode(Msg), LogsWebhook)
end
2 Likes
Maybe you didn’t enable HTTPServices?
2 Likes
Koriyoc
(Tree)
May 16, 2020, 2:51am
#3
You might need to turn on API Services on Game Settings.
varjoy
(variable)
May 16, 2020, 2:52am
#4
API services are enabled
30chars
1 Like
varjoy
(variable)
May 16, 2020, 2:53am
#6
When I try it on game, it said that, when I try on studio it says this:
1 Like
I’m not sure if you redacted the link from this code sample or not, but you aren’t posting a link so Roblox is probably assuming that you’re trying to make a post request to roblox.com which is illegal from HttpService. See PostAsync documentation for more information.
HttpsService:PostAsync(MISSING, JSONEncode, LogsWebhook)
* Note: if LogsWebhook is the link, ignore the three parameters, just change the two around so the URL is first and the encoding second.
2 Likes
varjoy
(variable)
May 16, 2020, 2:55am
#8
My own mistake, I though msg was first, then message.
1 Like