#entity nil wont respond after i say "andrew"

1 messages · Page 1 of 1 (latest)

queen granite
#
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local playername = Players.LocalPlayer.Name

Players.LocalPlayer.Chatted:Connect(function(msg)
    if msg:lower() == "andrew" then
        task.wait(3)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Poor Soul.")
    elseif msg:lower() == "watcher" then
        task.wait(3)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: He is watching you..")
    elseif msg:lower() == "2007blox" then
        task.wait(3)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Burn it")
    elseif msg:lower() == "who is andrew?" then
        task.wait(3)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: He played his copy of 2007BLOX.")
    elseif msg:lower() == "i hate you" then
        task.wait(3)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Hating me isn't the solution")
        task.wait(math.random(1, 2))
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: ".. `<font color='#FF0000'>{playername}</font>`.. " don't worry")
        task.wait(1)
        TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: You are next.")
    end
end)

I tested in both roblox studio and normal roblox server but it didnt work, this code is a local script inside starter gui
(reposted because i waited for help too long)

median basin
#

whats the error?

queen granite
#

even no warnings

#

the script is just silent

median basin
#

.Chatted is only working with the old TextChatService

queen granite
#

should i remove "LocalPlayer"

#

or what do i do

median basin
#

why remove localPlayer?

queen granite
#

idk, isnt local player a player model?

median basin
#

local player is the player local

#

you have to use .OnIncomingMessage

queen granite
#

ok

#

ill recode it

queen granite
# median basin you have to use .OnIncomingMessage

where do i put that

local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local playername = Players.LocalPlayer.Name

for _, player in Players:GetPlayers() do
    player.Chatted:Connect(function(msg)
        if msg == "Andrew" then
            task.wait(3)
            game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Poor Soul")
        end
    end)
end
median basin
#

is it working now?

#

oh wait a sec

#
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")

local localPlayer = Players.LocalPlayer

TextChatService.OnIncomingMessage = function(message)
    if message.TextSource and message.TextSource.UserId == localPlayer.UserId then
        local msg = message.Text:lower()

        if msg == "andrew" then
            task.wait(3)
            TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Poor Soul.")

#

you have to do it like that

queen granite
#

ok

#

lemme check if it works

#

he said poor soul before i send, then he said it again

median basin
#

huh?

queen granite
#

for some reason

#

when i enter "andrew" in chat, it takes a while to show up, but nil said Poor Soul before andrew

median basin
#

oh so it says Poor Soul

#

and then it waits 3 seconds

#

but it should be the other way

queen granite
#

hes supposed to wait for 3 seconds then say "Poor Soul"

median basin
#
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")

local localPlayer = Players.LocalPlayer

TextChatService.OnIncomingMessage = function(message)
    if message.TextSource and message.TextSource.UserId == localPlayer.UserId then
        local msg = message.Text:lower()

        if msg == "andrew" then
            TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Poor Soul.")
            task.wait(3)

#

oh wait

queen granite
#

lemme remove "task."

median basin
#
if msg == "andrew" then
    task.wait(3)
    TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("nil: Poor Soul.")
end
#

thats how it works

queen granite
#

bro, he still does that same bug

#

the tagged one is "andrew"

median basin
#

do it another time and dont say anything

#

only "andrew"

queen granite
#

bruh i dont know how to explain

#

when i put andrew in chat

#

it just waits for 3 seconds for my message to pop up in chat

#

then nil says Poor Soul before message popped up

median basin
#

hmm

queen granite
#

BRO MY CHAT FROZE

#

and i cant talk in chat, and i dont see messages from anyone else popping up