I have a local script that works on a player, and I want it to activate on the player who types in the command ":goku me". Yes, this is the goku localscript. Answers are appreciated! Thanks!! P.S Filtering is enabled, and this will work only for certain players.
Attempt:
game.Players.PlayerAdded:connect(function(player) if player.Name == "MrNicNac" then player.Chatted:connect(function(msg) msg = :goku me --not sure how to activate the localscript here end) end end)
Thanks for replying!
You need to catch the command inside of chat. have you forked all/part of chat? I think there's a spot you can add hooks to messages and check if they match your text.
I assume for this you will need the data on the server. So you'll need to have a way to communicate it to the local script, too. To get data back and forth you'll need remote events or remote functions: http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions
Also, in terms of organization rather than setting up the username check during the playeradded, you can think of it like this: