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

I need help for Custom Chat (FilterStringAsync) ?

Asked by 6 years ago
Edited 6 years ago

I try everything and it d'ont work

local chatstorage = game.Workspace.chat_Stock
local chatsecure = game.Chat
local Ranked = 'Player'
local owner = 'Owner'
local admin = 'Admin'
game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(message)
        local filtered = chatsecure:FilterStringAsync(message,player)
        local svalue = Instance.new('StringValue', chatstorage)
        if player then
            svalue.Name = player.Name..' ['..Ranked..']: '..filtered
            print(filtered)
        end
        if player.Name == 'ChaosVaporz' then
            svalue.Name = 'ChaosVaporz ['..owner..']: '..filtered
            print(filtered)
        end

        if player.Name == 'Maskilda' then
            svalue.Name = 'Maskilda ['..admin..']: '..filtered
            print(filtered)
        end

        if player.Name == 'Maruthus' then
            svalue.Name = 'Maruthus ['..admin..']: '..filtered
            print(filtered)
        end
        print(filtered)
        game:GetService('Debris'):AddItem(svalue, 3)
    end)
end)
0
FilterAsync works in-game. Not in roblox studio. iRexBot 147 — 6y

Answer this question