PHow do i make a onChatted thign that only listens to ME!?
local function onChatted(msg, speaker) local source = speaker.Name:lower() msg = msg:lower() if speaker.Name == "YourName" then --do h4x there end end
First, you would need to define the player, try the PlayerAdded event.
game.Players.PlayerAdded:connect(function(player) -- "Player" is defined for player's root. (The thing that holds Torso, head, humanoid, etc. end)
After that, You would listen to player's chat.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) -- Listening... to chat. end) end)
Finally, check the player's chat and check if it's the creator. Also check the message.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if player.userId == player.CreatorId then -- Is the player the creator? If yes do if msg == ":Start" then -- Is it :Start? If yes do --[[ OMGHAX ]] end end end) end)