Learn
Motor Sınıfı
ChatWindowConfiguration
Oluşturulamaz

*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.


Kod Örnekleri
Toplam Sohbet UI Sınırlarını Al
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local windowConfig = TextChatService.ChatWindowConfiguration
local inputBarConfig = TextChatService.ChatInputBarConfiguration
local function getTotalChatBounds()
local windowPos = windowConfig.AbsolutePosition
local windowSize = windowConfig.AbsoluteSize
local inputPos = inputBarConfig.AbsolutePosition
local inputSize = inputBarConfig.AbsoluteSize
-- Her iki dikdörtgenin birleşimini hesaplayarak toplam sohbet UI sınırlarını al.
-- Bildirilen değerler sohbet penceresinin üst ve alt kenarlarındaki dekoratif eğimi
-- içermez.
local topLeft = Vector2.new(
math.min(windowPos.X, inputPos.X),
math.min(windowPos.Y, inputPos.Y)
)
local bottomRight = Vector2.new(
math.max(windowPos.X + windowSize.X, inputPos.X + inputSize.X),
math.max(windowPos.Y + windowSize.Y, inputPos.Y + inputSize.Y)
)
return topLeft, bottomRight - topLeft
end
-- Sohbet UI'sinin başlatılmasını bekleyin ve mutlak değerleri bildirin
task.wait(2)
local position, size = getTotalChatBounds()
print("Toplam sohbet UI pozisyonu:", position)
print("Toplam sohbet UI büyüklüğü:", size)
-- Sınırları görsel olarak doğrulamak için yarı şeffaf bir çerçeve üst üste bindirin
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ChatBoundsDebug"
screenGui.DisplayOrder = 100
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Position = UDim2.fromOffset(position.X, position.Y)
frame.Size = UDim2.fromOffset(size.X, size.Y)
frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BorderSizePixel = 2
frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
frame.Parent = screenGui

API Referansı
Özellikler
AbsolutePosition
Salt Okunur
Çoğaltılmamış
Capabilities: Chat
ChatWindowConfiguration.AbsolutePosition:Vector2

AbsoluteSize
Salt Okunur
Çoğaltılmamış
Capabilities: Chat
ChatWindowConfiguration.AbsoluteSize:Vector2

BackgroundColor3
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.BackgroundColor3:Color3

BackgroundTransparency
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.BackgroundTransparency:number

Enabled
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.Enabled:boolean

FontFace
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.FontFace:Font

HeightScale
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.HeightScale:number

HorizontalAlignment
Capabilities: Chat
ChatWindowConfiguration.HorizontalAlignment:Enum.HorizontalAlignment

TextColor3
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.TextColor3:Color3

TextSize
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.TextSize:number

TextStrokeColor3
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.TextStrokeColor3:Color3

TextStrokeTransparency
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.TextStrokeTransparency:number

VerticalAlignment
Capabilities: Chat
ChatWindowConfiguration.VerticalAlignment:Enum.VerticalAlignment

WidthScale
Paralel oku
Capabilities: Chat
ChatWindowConfiguration.WidthScale:number

Yöntemler
DeriveNewMessageProperties
Capabilities: Chat
ChatWindowConfiguration:DeriveNewMessageProperties():ChatWindowMessageProperties
Kod Örnekleri
KullanıcılarDoğrudanSohbetEdebilirMi
local TextChatService = game:GetService("TextChatService")
local directChatParticipants = TextChatService:CanUsersDirectChatAsync(userId1, { userId2 })
-- Uygun katılımcıları kontrol et
if #directChatParticipants > 0 then
local directChannel = Instance.new("TextChannel")
directChannel.Parent = TextChatService
for _, participant in directChatParticipants do
directChannel:AddUserAsync(participant)
end
return directChannel
end
warn("TextChannel oluşturulamadı. Yeterli uygun kullanıcı yok.")
return nil

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.