RP Chat wont work

Shortly im making a RP Chat and i did the same 5 months ago but then i lost it and the code is similar to the old but it wont work for some reason
The code

local Plr = game.Players.LocalPlayer
game:GetService("TextChatService").SendingMessage:Connect(function(TextInstance)
	if Plr:GetAttribute("RPChat") == true then
		TextInstance.Text = "[RP] " .. TextInstance.Text
	end
end)

i simplefied the code for easier reading
Edit: I removed the code that adds and changes the attribute for rp chat

1 Like

Please just use TextChatService.OnIncomingMessage.

SendingMessage only works when :SendAsync() is called by the Client.

i dont know how to do that
because i dont work with RemoteFunction and β€œOn…” functions

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.