Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[ FIXED ]Print a chatted player name script not working?

game.Players.LocalPlayer.Chatted:Connect(function(msg)

if active then

sendMessage(msg)

end

if msg == "CLEAR ONE "..ClearOnePlayer then

print(ClearOnePlayer()

end

end)

I'm an experienced scripter but I don't really know how to do this. I want it to be so that if you type "CLEAR ONE" and a username of a player that is in the server it'll print the name..

5 comments

0

Also, the code shows "print(ClearOnePlayer) not print(ClearOnePlayer()

0

use a bit of string manipulation, sub, match, find, and gsub could all be used

1

use a bit of string manipulation, sub, match, find, and gsub could all be used

0

^ this should be an answer

0

I've been trying for the past few hours to get this working, it still won't work. Can you go into studio and try this?

1 answer

Hey guys! I appreciate the help on this, I tried that and now have a fix for it. Instead of finding it within the string it just detects if it's in another message after saying the message "CLEAR ONE" And instead of printing it it'll send the message. Btw this is for a police radio system that has worked out really well.

This discussion is preserved as it was. New answers, comments, and votes are closed.