Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

This question has been solved by the original poster.

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..

0
Also, the code shows "print(ClearOnePlayer) not print(ClearOnePlayer() hawkinator8554 -2 — 5y
0
use a bit of string manipulation, sub, match, find, and gsub could all be used theking48989987 2147 — 5y
1
use a bit of string manipulation, sub, match, find, and gsub could all be used theking48989987 2147 — 5y
0
^ this should be an answer SoftlockedUnderZero 668 — 5y
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? hawkinator8554 -2 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question