I'm making a chat logging script for my game. It just sends all the chat messages to a discord webhook. I know how to combine strings and instances, I use it a lot. But for some reason It's not working here.
Here's my script:
local http = game:GetService("HttpService")
local webhookUrl = "[webhook link]"
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg, r)
if r then
local data = {
-- too lazy to add this rn will do later
}
data = http:JSONEncode(data)
http:PostAsync(webhookUrl, data)
else
local data = {
-- */* The error is here: *\* --
["content"] = "**"..player.."** said "..msg.."."
}
data = http:JSONEncode(data)
http:PostAsync(webhookUrl, data)
end
end)
end)

2 comments
Slap me pls, because i don't answer XDD maybe tomorrow
Get /slap'd