Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I replace the default chat GUI?

Asked by 10 years ago

Iv'e got my chat gui working now, but the default chat appears over it. how do I fix this? Here's the code for reference:

function UpdateOldLabels(Parent)
    for i,v in pairs(Parent:GetChildren()) do
        if v.Name:sub(1,4):lower() == "line" then
            local LineNumber = v.Name:sub(5)
            if LineNumber == "12" then
                v:Destroy()
            else
                v.Name = "line"..tostring(tonumber(LineNumber) + 1)
                v.Position = v.Position - UDim2.new(0,0,0,25)
            end
        end
    end
end

game:GetService("Players").PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        for _,v in ipairs(game:GetService("Players"):GetChildren()) do
            UpdateOldLabels(v:WaitForChild("PlayerGui").ScreenGui.Frame)
            newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").ScreenGui.Frame)
            newchatline.Text = player.Name.. ": " ..msg
            newchatline.Size = UDim2.new(1,0,0,25)
            newchatline.Position = UDim2.new(0,0,1,-25)
            newchatline.Font = "SourceSans"
            newchatline.TextColor3 = Color3.new (math.random(), math.random(), math.random())
            newchatline.TextStrokeTransparency = 0.5
            newchatline.TextStrokeColor3 = Color3.new (math.random(), math.random(), math.random())
            newchatline.BackgroundTransparency = 1
            newchatline.BorderSizePixel = 0
            newchatline.FontSize = "Size24"
            newchatline.TextXAlignment = "Left"
            newchatline.TextYAlignment = "Top"
            newchatline.ClipsDescendants = true
            newchatline.Name = "line1"
        newchatline.TestWrapped = true
        end
        UpdateOldLabels(game:GetService("StarterGui").ScreenGui.Frame)
        newchatline:Clone().Parent = game:GetService("StarterGui").ScreenGui.Frame
    end)
end)

2 answers

Log in to vote
2
Answered by 10 years ago

Go to the Configure settings of your place, go to permissions, and change "Chat Type" to "Bubble".

0
thanks :) VentusWind78 25 — 10y
0
Accept my answer if I helped :) Articulating 1335 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Really easy fix, not scripting though. Go into the settings of your place under configure and toggle the classic chat. (You may keep bubble-chat if you so desire).

Answer this question