#can someone help solve my issue with this script?

1 messages · Page 1 of 1 (latest)

native hornet
#

its supposed to give me and someone else a chat tag but its giving it to the whole server instead even if i put the user ids

local textChatService = game:GetService("TextChatService")

textChatService.OnIncomingMessage = function(message: TextChatMessage)

local properties = Instance.new("TextChatMessageProperties")

if message.TextSource then

    local player = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)

    if player.UserId == "971548861" or "207899016" then

        properties.PrefixText = "<font color='#FFFF00'>[👑Owner]</font> " .. message.PrefixText

    end

end

return properties

end

rustic sequoia
#
local textChatService = game:GetService("TextChatService")

textChatService.OnIncomingMessage = function(message: TextChatMessage)

    local properties = Instance.new("TextChatMessageProperties")

    if message.TextSource then

        local player = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)

        if player.UserId == 971548861 or 207899016 then

            properties.PrefixText = "<font color='#FFFF00'>[👑Owner]</font> " .. message.PrefixText

        end

    end

    return properties

end```
#

try that

#

and to make it easier to read consdier using a table of values instead but thats up to you

native hornet
#

its also in the new chat since legacy is gone

rustic sequoia
#

Okay well mabye try to print it your not there right person so you know if it actually getting a message anyway

#
local textChatService = game:GetService("TextChatService")

textChatService.OnIncomingMessage = function(message: TextChatMessage)

    local properties = Instance.new("TextChatMessageProperties")

    if message.TextSource then

        local player = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)

        if player.UserId == 971548861 or player.UserId == 207899016 then

            properties.PrefixText = "<font color='#FFFF00'>[👑Owner]</font> " .. message.PrefixText
        else
            print(player.UserId)
        end

    end

    return properties

end```
polar shoal
native hornet
polar shoal
#

the "<font color>" tag

#

do they support that

#

thats OTF formatting

#

sorry wait, I think it's ttf formatting not otf

#

either way, that could be your issue

#

I don't work with chat scripts much but try removing that color tag