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

How do I make these chat tags work?

Asked by 5 years ago

So, I'm trying to make developers have chat tags for my game, but for some unknown reason, it only gives the chat tag to FuddziezYT. Please someone help me with the script. Roblox studio shows that there is no errors but it only gives tags to one person still.I'm pretty bad at scripting so I need help to solve the issue. Here's the script :

game.Players.PlayerAdded:connect(function(plr)
    local tags = Instance.new("Folder",plr)
    tags.Name = "Tags"
    if plr.Name == "FuddziezYT" then
        local newTag = Instance.new("IntValue",tags)
        newTag.Name = "CREATOR"
        local chatColor = Instance.new("Color3Value",newTag)
        chatColor.Name = "ChatColor"
        chatColor.Value = BrickColor.new("Really red").Color
        local tagColor = Instance.new("Color3Value",newTag)
        tagColor.Name = "TagColor"
        tagColor.Value = BrickColor.new("New Yeller").Color

    if plr.Name == "Trollicus_Dev" then
        local newTag = Instance.new("IntValue",tags)
        newTag.Name = "CREATOR"
        local chatColor = Instance.new("Color3Value",newTag)
            chatColor.Name = "ChatColor"
            chatColor.Value = BrickColor.new("Really red").Color
            local tagColor = Instance.new("Color3Value",newTag)
            tagColor.Name = "TagColor"
            tagColor.Value = BrickColor.new("New Yeller").Color

    if plr.Name == "DominusLegendary" then
        local newTag = Instance.new("IntValue",tags)
        newTag.Name = "DEV"
        local chatColor = Instance.new("Color3Value",newTag)
        chatColor.Name = "ChatColor"
        chatColor.Value = BrickColor.new("Really red").Color
        local tagColor = Instance.new("Color3Value",newTag)
        tagColor.Name = "TagColor"
        tagColor.Value = BrickColor.new("New Yeller").Color

    if plr.Name == "david_mcpguy" then
        local newTag = Instance.new("IntValue",tags)
        newTag.Name = "DEV"
        local chatColor = Instance.new("Color3Value",newTag)
        chatColor.Name = "ChatColor"
        chatColor.Value = BrickColor.new("Really red").Color
        local tagColor = Instance.new("Color3Value",newTag)
        tagColor.Name = "TagColor"
        tagColor.Value = BrickColor.new("New Yeller").Color

        end

        end

        end
    end
end)

1 answer

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

Put the end's after each if statement.

Like this:

game.Players.ChildAdded:Connect(function(plr)
        local tags = Instance.new('Folder', plr)
        tags.Name = 'Tags'

        if plr.Name == 'FuddziesYT' then
               --giving the 'Creator' tag to 'FuddziesYT'
        end
        if plr.Name == 'Trollicus_Dev' then
               --giving the 'Creator' tag to 'Trollicus_Dev'
        end
        if plr.Name == 'DominusLegendary' then
               --Giving the 'Dev' tag to 'DominusLegendary'
        end
        if plr.Name == 'david_mcpguy' then
               --Giving the 'Dev' tag to 'david_mcpguy'
        end
end)

I can't rewrite this whole script, as it'll take to long and I'm on mobile. For giving the tag to the player, just do it the way you did in the code, like creating an IntValue and naming it to the role to give to the player, creating the ChatColour and TagColour

0
Could you please put this into the whole script So I can just set the script as the one that works? Thanks. DenisYordanov 9 — 5y
0
I've edited the code Rare_tendo 3000 — 5y
0
Thank you so much! DenisYordanov 9 — 5y
Ad

Answer this question