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 3 years ago
Edited 3 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 — 3y

2 answers

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

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

01local players = game:GetService("Players")
02local chatservice = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
03game.Players.PlayerAdded:Connect(function(plr)
04    if plr.UserId ==1367449480 then
05chatservice.SpeakerAdded:Connect(function(playerName)
06        local speaker = chatservice:GetSpeaker(playerName)
07        speaker:SetExtraData("Tags",{{TagText = "MAD", TagColor = Color3.fromRGB(255,0,0)}})
08        end)
09    end
10end)
0
You can only set one. Trying to set another one will replace the previous one. 3F1VE 257 — 3y
0
To mimic it having 2 tags you can just make it from "MAD" to "MAD [Owner" 3F1VE 257 — 3y
0
Regular script either in workspace or ServerScriptService. 3F1VE 257 — 3y
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 — 3y
View all comments (2 more)
0
try replace end in line 8 with end) NGC4637 602 — 3y
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 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

i got this:

01local players = game:GetService("Players")
02local chatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
03 
04local tags = {
05    [1367449480] = {TagText = "Owner", TagColor = Color3.fromRGB(255,0,0)},
06}
07 
08chatService.SpeakerAdded:Connect(function(playerName)
09    local speaker = chatService:GetSpeaker(playerName)
10    local player = game.Players[playerName]
11 
12    if tags[player.UserId] then
13        speaker:SetExtraData("Tags",{tags[player.UserId]})
14    end
15end)

Answer this question