I am making a game where server scripts send text messages to client through a GUI, but this is the result:
This is the function that handles text:
function SendLine(Text, _Color, NoTime)
print(Text)
if LocalPlayer:FindFirstChild("PlayerGui") and LocalPlayer:FindFirstChild("PlayerGui").ClassName == "PlayerGui" then
NoTime = NoTime or false
local NewText = (" %s - %s"):format(tostring(TimeStamp()), Text:gsub("\0", "\5"))
if NoTime == true then
NewText = (" > %s"):format(Text:gsub("\0", "\5"))
end
local Label = Instance.new("TextLabel", Content)
Label.Name = "Line"
Label.ZIndex = 2
Label.BackgroundTransparency = 1
Label.BorderSizePixel = 0
Label.Text = tostring(NewText)
if type(_Color) == "string" then
Label.TextColor3 = BrickColor.new(_Color).Color
else
Label.TextColor3 = _Color
end
Label.TextStrokeTransparency = 0.99
Label.Font = "SourceSansBold"
Label.FontSize = "Size14"
Label.TextWrapped = false
Label.Size = UDim2.new(1, 0, 0, 15)
Label.Position = UDim2.new(0, 0, 0, CalculatePosition(Content))
Label.TextXAlignment = "Left"
Label.TextYAlignment = "Top"
if #Content:GetChildren() > 14 then
Content.CanvasSize = UDim2.new(5, 0, 0, CalculateCanvasSize(Content))
Content.CanvasPosition = Vector2.new(0, (Content.CanvasSize.Y.Offset - Content.AbsoluteSize.Y) + 5)
end
end
end
Is this a known issue or is it my fault?
