of     1   

xXRevengeCreeperXx
#169284801Thursday, July 30, 2015 12:05 AM GMT

I want to add color for vips but idk how, I tried it on the chatdisplayscript but only changes all the chat lines colors I need it to be one individual color for each vip. the color for vip is (0, 1, 0) ServerScript: local MAX_MESSAGES = 11 -- a dictionary between players and the list of messages they should see -- note the use of weak tables (http://wiki.roblox.com/index.php?title=Weak_tables) -- to save memory, so that message lists are kept only while the player is in game local messageData = setmetatable({}, {__mode='k'}) -- function to store filtered message for each player and send update local function storeMessage(sender, message, rank, filteredMessage) -- loop through all players in the game for _, player in pairs(game.Players:GetPlayers()) do -- filter message local filteredMessage = rank .. sender .. " > " .. game.Chat:FilterStringForPlayerAsync(player, message) -- get table containing past messages local playerMessages = messageData[player] -- add new message to table table.insert(playerMessages, filteredMessage) -- check if table is full. If so, remove the oldest message if #playerMessages > MAX_MESSAGES then table.remove(playerMessages, 1) end -- send update to the player game.ReplicatedStorage.SendMessages:FireClient(player, playerMessages) end end -- bind function to when player joins the game game.Players.PlayerAdded:connect(function(player) -- setup table to hold messages for the player local playerMessages = {} messageData[player] = playerMessages -- bind function to player chat player.Chatted:connect(function(message, rank) if player.Name == "xXRevengeCreeperXx" then rank = "(Owner)" elseif player.Name == "Austin452w" then rank = "(Game Admin)" elseif player.Name == "thegoodpuppy" then rank = "(Game Admin)" elseif player.Name == "ElkHunterKiller" then rank = "(General Of The Army)" elseif player.Name == "Player" then rank = "(Testing Is In Progress)" elseif game:GetService("GamePassService"):PlayerHasPass(player, 273532201) then rank = "(VIP)" else rank = "" end storeMessage(player.Name, message, rank) end) -- A player's GUI gets reset on respawn so we need to update the gui with the player's -- messages when they respawn player.CharacterAdded:connect(function(character) game.ReplicatedStorage.SendMessages:FireClient(player, playerMessages) end) end) ChatDisplayScript: local chatFrame = script.Parent.ChatFrame local Name = game.Players.LocalPlayer local player = game.Players.LocalPlayer -- Bind function to update from server game.ReplicatedStorage.SendMessages.OnClientEvent:connect(function(messages) -- Clear all of the current messages chatFrame:ClearAllChildren() -- Create TextLabel for every message for i, message in pairs(messages) do local newLine = Instance.new("TextLabel", chatFrame) newLine.Text = message newLine.Size = UDim2.new(1,0,0,18) newLine.Position = UDim2.new(0,0,0,18*(i-1)) newLine.TextXAlignment = Enum.TextXAlignment.Left newLine.TextYAlignment = Enum.TextYAlignment.Center newLine.BackgroundTransparency = 1 newLine.BorderSizePixel = 0 newLine.FontSize = Enum.FontSize.Size18 newLine.Font = Enum.Font.SourceSans newLine.TextColor3 = Color3.new(1, 1, 1) newLine.TextStrokeTransparency = 0 end end)
xXRevengeCreeperXx
#169299700Thursday, July 30, 2015 2:41 AM GMT

BUMP
Locard
#169300128Thursday, July 30, 2015 2:46 AM GMT

Instead of storing just the text, you should store the color for each message as well.
xXRevengeCreeperXx
#169302445Thursday, July 30, 2015 3:08 AM GMT

How to do that?
xXRevengeCreeperXx
#169309545Thursday, July 30, 2015 4:24 AM GMT

Bump
xXRevengeCreeperXx
#169331650Thursday, July 30, 2015 11:18 AM GMT

Bum
cody123454321
#169331909Thursday, July 30, 2015 11:25 AM GMT

Learn 2 OOP
xXRevengeCreeperXx
#169399304Thursday, July 30, 2015 11:40 PM GMT

Bu
BothAngles
#169399864Thursday, July 30, 2015 11:45 PM GMT

mp
xXRevengeCreeperXx
#169412123Friday, July 31, 2015 1:37 AM GMT

B
xXRevengeCreeperXx
#169995127Wednesday, August 05, 2015 3:53 AM GMT

Bump

    of     1