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

How chat no respond back to whitelisted?

Asked by
TechModel 118
2 years ago

How come this does not try to respond back when the whitelist 12345 for example id say "hey" in the roblox chat default, and everyone respond back. But chat function :Chat() not doing anything. Needs to be different like fire event or something?

game.Players.PlayerAdded:Connect(function(plr)

    plr.Chatted:Connect(function(Message)
        local SplitMessage = Message:split(" ")
        if SplitMessage[1] == "hey" then
            local whitelistecheck = 12345
            if whitelistecheck[plr.UserId] then
                game.Players.LocalPlayer:Chat("hey")
            end
        end
    end)
end)

Answer this question