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

I need help with a custom chat gui?

Asked by
Prioxis 673 Moderation Voter
10 years ago

this is my custom chat gui script it works and everything but the default roblox chat gui still pops up how do I disable the default chat gui?

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,15)
            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,15)
            newchatline.Position = UDim2.new(0,0,1,-15)
            newchatline.Font = "SourceSansBold"
            newchatline.TextColor3 = Color3.new(1,1,1)
            newchatline.TextStrokeTransparency = 0
            newchatline.BackgroundTransparency = 0.5
            newchatline.BorderSizePixel = 0
            newchatline.FontSize = "Size14"
            newchatline.TextXAlignment = "Left"
            newchatline.TextYAlignment = "Top"
            newchatline.ClipsDescendants = true
            newchatline.Name = "line1"
        end
        UpdateOldLabels(game:GetService("StarterGui").ScreenGui.Frame)
        newchatline:Clone().Parent = game:GetService("StarterGui").ScreenGui.Frame
    end)
end)

3 answers

Log in to vote
11
Answered by 10 years ago

Make sure to have the chat set to Bubble chat and put the script in ServerScriptService.

1
Please accept this if it helps! coldice231 45 — 10y
1
Why did someone down vote? coldice231 45 — 10y
2
idk Prioxis 673 — 10y
Ad
Log in to vote
6
Answered by 10 years ago

Go to Configure place and find Chat Type, turn it to Bubble chat only.

Log in to vote
1
Answered by 9 years ago

Go to the configure place > Permissions > Chat Type, Then set it to Bubble. Hope this helped!

Answer this question