Scripting Issue - attempt to concatenate Instance with string

I am getting this error in console and it is not sending the webhook? Can anyone help me.

The error is: ServerScriptService.Priority Script:24: attempt to concatenate Instance with string

My code is:

– Gets the “chat” service. Required later for ‘FilterStringForBroadcast’.
local ChatService = game:GetService(“Chat”)

local webhook = “webhook link removed for privacy reasons

local HTTP = game:GetService(“HttpService”)
– Gets the “ReplicatedStorage” service.
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)

– Gets the RemoteEvent that you created earlier.
local RemoteEvent = ReplicatedStorage:WaitForChild(“InProgressEvent”)
local FilteringFunctionEvent = ReplicatedStorage:WaitForChild(“FilteringFunctionEvent”)
local FilteringFunction = ReplicatedStorage:WaitForChild(“FilteringFunction”)
– Now that you have declared some variables, let’s get down to the code that does all the magic. First, add this to your script:

game.Players.PlayerAdded:Connect(function(player) – This event fires whenever someone joins your game.
player.Chatted:Connect(function(message) – This event fires whenever someone says something in the game chat.
local args = message:split(" ") – Splits arguments.
if args[1]:lower() == “/inprogress” then
wait(1)
RemoteEvent:FireAllClients()
local payload = HTTP:JSONEncode({
content = “#everyone Priority started by “…player…”** A priority call is in progress. Please do not interfere, otherwise you will be kicked. All calls are on hold.**”,
username = “WARNING”
})

		HTTP:PostAsync(webhook, payload)
    end
end)

end)

You meant player.Name right here :stuck_out_tongue:

1 Like

Oop. Yes. I just happened to skip over that lol. Thanks.

1 Like