I tried this:

local plrs = game.Players:GetPlayers

function findPlayer(message,speaker)
	if (string.sub(message,1,5) == "kill/" and (string.sub(message,7) == plrs.Name then
		print("kaboom.")
end

This script is trying to match a chat message with an object, but this won't work.

5 comments

0

Line1: ':GetPlayers' should be ':GetPlayers()" it is a function, don't forget the parentheses.

0

If you're trying to find who said that then you should use Chatted.

0

game.Players:FindFirstChld(message:sub(7,-1))

0

You seem to not understand how tables work, or the function GetChildren/GetPlayers.