admin = "NinjoOnline" child.Chatted:connect(function (msg) local v=Instance.new("StringValue") v.Value=child.Value.." "..child.Value.." "..child.Name..": "..msg local col=Instance.new("Color3Value",v) col.Name="Color" col.Value=child.TeamColor.Color game.Debris:AddItem(v,3) gui=game.StarterGui.ChatService.Chats t1=gui.Text1 t2=gui.Text2 t3=gui.Text3 t4=gui.Text4 t5=gui.Text5 t6=gui.Text6 t1.TextColor3=t2.TextColor3 t1.Text=t2.Text t2.TextColor3=t3.TextColor3 t2.Text=t3.Text t3.TextColor3=t4.TextColor3 t3.Text=t4.Text t4.TextColor3=t5.TextColor3 t4.Text=t5.Text t5.TextColor3=t6.TextColor3 t5.Text=t6.Text t6.TextColor3=col.Value t6.Text=v.Value v.Parent=script end)
How come when I want say an admin to chat, it gives it a tag infront of the players name, saying "Admin" This dosen't work. What am I doing wrong?
I assume this script goes in the Gui itself? If so, this should be a LocalScript, and Gui will be the LocalScript's parent. This is a huge change, and I'm not sure if it is exactly what you want. If it's not, please let me know, and give me exactly what you want it to do, and I will try to help you.
[[[EDITED]]]
local admin = "NinjoOnline" local gui = script.Parent local t1 = gui.Text1 local t2 = gui.Text2 local t3 = gui.Text3 local t4 = gui.Text4 local t5 = gui.Text5 local t6 = gui.Text6 function chatEvent(player) player.Chatted:connect(function(msg) t1.TextColor = t2.TextColor t1.Text = t2.Text t2.TextColor = t3.TextColor t2.Text = t3.Text t3.TextColor = t4.TextColor t3.Text = t4.Text t4.TextColor = t5.TextColor t4.Text = t5.Text t5.TextColor = t6.TextColor t5.Text = t6.Text t6.TextColor = player.TeamColor t6.Text = (player.Name == admin and "[ADMIN] " or " ") .. player.Name .. ": " .. msg end) end for _, player in pairs(game.Players:players()) do chatEvent(player) end game.Players.PlayerAdded:connect(chatEvent) --~^ Edited and posted by Tkdriverx: Teh Penguinator ^~--