Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Attempted to Concatenate Instance with String?

Asked by 4 years ago
Edited 4 years ago

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:

01local http = game:GetService("HttpService")
02local webhookUrl = "[webhook link]"
03 
04 
05game.Players.PlayerAdded:Connect(function(player)
06    player.Chatted:Connect(function(msg, r)
07        if r then
08            local data = {
09                -- too lazy to add this rn will do later
10            }
11            data = http:JSONEncode(data)
12            http:PostAsync(webhookUrl, data)
13        else
14            local data = {
15                -- */* The error is here: *\* --
View all 22 lines...
0
Slap me pls, because i don't answer XDD maybe tomorrow Ferrarimami 120 — 4y
0
Get /slap'd Recrucity 13 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Nevermind! Small mistake :) I had to change it to player.Name lol :)

Ad

Answer this question