Getting chat error here

I want to make it so where if someone says “RUN NAME username” it will send there username in this radio thing.

For example “RUN NAME coolbro49” it will pop back as “Player has 4 arrests”
I’m getting an error it’ll show down

LOCAL SCRIPT

Player.Chatted:Connect(function(ChatMessage)
	if Active == false then return end
	if CurrentChannel == "Dispatch" then
		RunPlayerEvent:FireServer(ChatMessage)
	end
end)

SERVER SCRIPT

radioFolder.RunPlayer.OnServerEvent:Connect(function(ChatMessage)
	if ChatMessage == "RUN NAME "..game.Players:FindFirstChild(string.split(ChatMessage, " ")[3]).Name then
		local PlayerRunne = game.Players:FindFirstChild(string.split(ChatMessage, " ")[3])
		FrameTo_output.LineOne.Text = "DISPATCH: "..PlayerRunne.." has, "..PlayerRunne.Arrests.Value.." arrests!"
	end
end)

20:12:39.310 Players.d_rewops.PlayerGui.LEORadio.Main:35: invalid argument #1 to ‘split’ (string expected, got Instance) - Server - Main:35

1 Like

The first argument of a RemoteEvent is always the player, which is a instance. Add “player” before “ChatMessage” on the remote.

It worked thank you sir. It helps a lot.

ok bye sir nice sir ok sir yes