game.Players:Chat() not working

I’m running this:

game.Players:Chat("Test") --> no error but doesnt work
1 Like

You can’t use it in your scripts.

1 Like

Where are you running this code. In the command bar or a script?

In the documentation, it specifies that it cannot be run by scripts.

I ran it in command bar

char limit

Em if you want to know then there is an another method to make the player chat.
It is a remote event that fires from client so you can just use player:FireClient and on the client fire that remote.

1 Like

Would it be the remote here:

local messageRequest = game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest

Did you use roblox studio standard command bar or roblox command bar?

1 Like

Yes it is agdhgajakdj. So many char

1 Like

Studios command bar.

char limit

Try another command bar in roblox.
Press f9 and then press server.
I mean this one.
Screenshot_2022-07-16-10-51-52-258_com.roblox.client

1 Like

It errors there due to lack of permissions.

Ok now press test and change current client to current server and use your standart command bar in roblox studio.

1 Like

Now it gave me the error:

No local Player to chat from

Then I guess you can use this method

1 Like

Thanks. Appreciate your time. Have a good one!

1 Like

https://developer.roblox.com/en-us/api-reference/function/Chat/Chat