Normal script

script.GlobalChatLocal.Parent=game:GetService('StarterPlayer').StarterPlayerScripts
script.ChatMsg.Parent=workspace
local data=game:GetService('DataStoreService')
local datastore=data:GetDataStore('GlobalChatData')

local key='RecentChatMsg'

datastore:OnUpdate(key, function(msg)
	workspace.ChatMsg:FireAllClients(msg,Color3.new(1,1,1))
end)
workspace.ChatMsg.OnServerEvent:connect(function(plr,msg)
	datastore:SetAsync(key,('['..plr.Name..']: '..msg))
end)

Local script in the Normal script

print'global chat system clientside loaded'
workspace.ChatMsg.OnClientEvent:connect(function(txt,color)
	for _,p in pairs(game.Players:GetPlayers()) do
		local plrc=string.len(p.Name) 
		local plrname=string.sub(txt,2,plrc+1)
		if plrname==p.Name then return end
	end
	pcall(function() game:service("StarterGui"):SetCore("ChatMakeSystemMessage",{Text=txt}) end)
end)
game.Players.LocalPlayer.Chatted:connect(function(msg,rec)
	if rec then return end
	workspace.ChatMsg:FireServer(msg)
end)

a ChatMsg Remoteevent inside Normal script

i want to use FilterStringAsync somehow So if u say something in chat it wil send it to every server but there are no tags

(NOT MY SCRIPT)

4 comments

0

dude free models suck they 90% use deprecated stuff and dont work u need to show effort for me to help u

0

"deceprated" they use the new workspace...

0

they still use the :service method

0

Thanks for the global chat, I will use it ;)