How can I get how much Unicode Characters a player has typed

Hello. I am trying to make a cave system, but I need the following thing: how can I get how many Unicode Characters ( , d, e, 3, etc) a player has typed in a chat message?

1 Like

What you can do is use:

game.Players.PlayerAdded:Connect(function(player)
     player.Chatted:Connect(function(message,recipent)
             --Get characters using the message 
             local characters = string.len(message)
               
             --Do whatever you want with the new variable
     end)
end)

You can get more information about this in the string | Documentation - Roblox Creator Hub api reference

1 Like
string.len(String) == #String
1 Like

I will make a code with that, thanks, and see if it worked