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

How do I make ‘[Owner] [MAD] Whatever I say’ when I say something in chat?

Asked by 2 years ago
Edited 2 years ago

It’s like something where it identifies you as the [Owner] or like [Head Builder] (I did [MAD] in the title bc that’s my display name)

0
i fixed the error but it didn't work still. Dont worry anymore bc i got a tutorial MAD_DENISDAILY2 137 — 2y

2 answers

Log in to vote
0
Answered by
3F1VE 257 Moderation Voter
2 years ago
Edited 2 years ago

Scripting helpers is not a request site! (I'll provide the code though) Here's the code :

local players = game:GetService("Players")
local chatservice = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
game.Players.PlayerAdded:Connect(function(plr)
    if plr.UserId ==1367449480 then
chatservice.SpeakerAdded:Connect(function(playerName)
        local speaker = chatservice:GetSpeaker(playerName)
        speaker:SetExtraData("Tags",{{TagText = "MAD", TagColor = Color3.fromRGB(255,0,0)}})
        end)
    end
end)
0
You can only set one. Trying to set another one will replace the previous one. 3F1VE 257 — 2y
0
To mimic it having 2 tags you can just make it from "MAD" to "MAD [Owner" 3F1VE 257 — 2y
0
Regular script either in workspace or ServerScriptService. 3F1VE 257 — 2y
0
There’s a error: Workspace.Script:9: Expected ‘)’ (to close ‘(‘ at line 5),got ‘end’. And: ServerScriptService.Script:9: Expected ‘)’ (to close ‘(‘ at line 5),got ‘end’ MAD_DENISDAILY2 137 — 2y
View all comments (2 more)
0
try replace end in line 8 with end) NGC4637 602 — 2y
0
I did that but it still didn’t work :(. But no worry’s, I got one with a table and inside of the table it have the Id and the color and the text and stuff. MAD_DENISDAILY2 137 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

i got this:

local players = game:GetService("Players")
local chatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local tags = {
    [1367449480] = {TagText = "Owner", TagColor = Color3.fromRGB(255,0,0)},
}

chatService.SpeakerAdded:Connect(function(playerName)
    local speaker = chatService:GetSpeaker(playerName)
    local player = game.Players[playerName]

    if tags[player.UserId] then
        speaker:SetExtraData("Tags",{tags[player.UserId]})
    end
end)

Answer this question