Unable to Concatenate String with Instance Error

Hello, I am receiving the “Unable to Concatenate String with Instance” error when running a script. From what I’ve looked at with other posts, I can’t seem to figure out why Player.UserId does not work, and Arg2 is already a string, so please don’t suggest tostring(Arg2), I tried and it doesn’t work.

local Len = 6
local Arg2 = msg:sub(Len)

-- Farther down in the script

local ReviewedMessage = TextService:FilterStringAsync(Arg2, Player.UserId, Enum.TextFilterContext.PrivateChat)

Are you sure the error is coming from one of the lines you are showing us? I see no concatenation whatsoever…

2 Likes

You are in fact correct lol thank u im a little disabled. i was looking at the wrong line the entire time i see whats wrong now

1 Like

Please share the issue and solution and mark your reply as the topic Solution, so that anyone else who comes across this issue may find a relevant topic.

Ok well the solution was for me to check the line below it…which just needed a tostring