generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Custom Chat Help

Previous Thread :: Next Thread 
Kurokku is not online. 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 is not online. 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 is not online. Kurokku
Joined: 01 Aug 2015
Total Posts: 3622
11 Jul 2016 04:48 PM
plz


PoorBag Alert R$22
Report Abuse
Kurokku is not online. Kurokku
Joined: 01 Aug 2015
Total Posts: 3622
11 Jul 2016 06:03 PM
;-;


PoorBag Alert R$22
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

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



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image