Hey there,
I got this webhook that aint working for some reason, its a remote function being fired from a local script if that info helps. Heres my code:
game.Players.PlayerAdded:Connect(function(plr)
local webevent = game.ReplicatedStorage.Webhook
local hatinfo = game.ReplicatedStorage.HatInfo
local HttpService = game:GetService("HttpService")
local Webhook = ""
webevent.OnServerEvent:Connect(function()
local data =
{
["content"] = ""; -- Content: Message above the title.
["embeds"] = {{
["title"] = "A hat was just purchased!"; -- The title of the message.
["description"] = "**"..plr.Name.."** just bought a Violet Valk hat for 800 crowns!"; -- Description of the message, under the title.
["color"] = tonumber(0xAE00FF); -- Hex color code, currently set to red.
["thumbnail"] = {
["url"] = ""..hatinfo.VioletValk.Image.Value;
};
["timestamp"] = DateTime.now():ToIsoDate(); -- Will add the date, and the time to the message, not regular to discord.
}}
}
local finaldata = HttpService:JSONEncode(data) -- JSONEncode the whole table you just made, make sure it's not "JSONDeCode"
HttpService:PostAsync(Webhook, finaldata)
end)
end)