Сhatbox display only messages from people who are near you

    print(0)
    local speakerObj = ChatService:GetSpeaker(fromSpeaker)
    local channelObj = ChatService:GetChannel(channelName)
    if (speakerObj and channelObj) then
        print(1)
        local player = speakerObj:GetPlayer()
        if (player) then
            print(2)
            for i, speakerName in pairs(channelObj:GetSpeakerList()) do
                local otherSpeaker = ChatService:GetSpeaker(speakerName)
                if (otherSpeaker) then
                    print(3)
                    local otherPlayer = otherSpeaker:GetPlayer()
                    if (otherPlayer) then
                        print(4)
                        local HumanoidRootPart = otherPlayer.Character and otherPlayer.Character:FindFirstChild("HumanoidRootPart")
                        if HumanoidRootPart and table.find(GetPlayersInRadius(HumanoidRootPart.Position, 10), otherPlayer) then
                            print(5, HumanoidRootPart, GetPlayersInRadius(HumanoidRootPart.Position, 10))
                            local extraData = {
                                NameColor = player.TeamColor.Color,
                                ChatColor = player.TeamColor.Color,
                                ChannelColor = player.TeamColor.Color
                            }
                            otherSpeaker:SendMessage(message, channelName, fromSpeaker, extraData)
                        else
                            --// Could use this line to obfuscate message for cool effects
                            --otherSpeaker:SendMessage(message, channelName, fromSpeaker)
                        end

                    end
                end
            end

        end
    end

    return true
end```