Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 11 Jul 2016 09:30 AM |
I am making a thing so when a player levels up it'll say it in my custom chat but my problem is that it's not even putting it in the chat... Anyone know how to fix it?
local Kurokku = 90519431 local nowname = 7724360
function rankCheck(player) if player.UserId == Kurokku then return "" elseif player.UserId == nowname then return "" else return "" end end function NewLabel(parent, msg, player) newchatline = Instance.new("TextLabel", parent) newchatline.Text = rankCheck(player) .. "" .. player.Name.. ": " ..msg newchatline.Size = UDim2.new(1,0,0,25) newchatline.Position = UDim2.new(0,0,1,-25) newchatline.Font = "SourceSans" if player.UserId == Kurokku then newchatline.TextColor3 = Color3.new(255/255, 0/255, 255/255) elseif player.UserId == nowname then newchatline.TextColor3 = Color3.new(0/255, 179/255, 255/255) else newchatline.TextColor3 = Color3.new(1,1,1) end newchatline.TextStrokeTransparency = 0 newchatline.BackgroundTransparency = 1 newchatline.BorderSizePixel = 0 newchatline.FontSize = "Size24" newchatline.TextXAlignment = "Left" newchatline.TextYAlignment = "Top" newchatline.ClipsDescendants = true newchatline.Name = "line1" end
function PlayerLevel(parent, msg, player) player:WaitForChild("leaderstats"):WaitForChild("lvl").Changed:connect(function() lvlchatline = Instance.new("TextLabel", parent) lvlchatline.Text = player.Name .. " Has Leveled Up!" lvlchatline.Size = UDim2.new(1,0,0,25) lvlchatline.Position = UDim2.new(0,0,1,-25) lvlchatline.Font = "SourceSans" lvlchatline.TextColor3 = Color3.new(255/255, 0/255, 255/255) lvlchatline.TextStrokeTransparency = 0 lvlchatline.BackgroundTransparency = 1 lvlchatline.BorderSizePixel = 0 lvlchatline.FontSize = "Size24" lvlchatline.TextXAlignment = "Left" lvlchatline.TextYAlignment = "Top" lvlchatline.ClipsDescendants = true lvlchatline.Name = "line1" end) end
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").CustomChat.ChatHold) NewLabel(v:WaitForChild("PlayerGui").CustomChat.ChatHold, msg, player) end end) end)
PoorBag Alert R$78 |
|
|
| Report Abuse |
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 11 Jul 2016 11:23 AM |
there's no error output either
PoorBag Alert R$78 |
|
|
| Report Abuse |
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
| |
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
| |