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)

1 comment

0

FilterAsync works in-game. Not in roblox studio.