of     1   

vastqud
#184811963Saturday, March 05, 2016 8:46 PM GMT

game:GetService('Players').PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) for _,v in ipairs(game:GetService("Players"):GetChildren()) do for i,oldmsg in ipairs(v:WaitForChild("PlayerGui").CustomChat.Frame:GetChildren()) do oldmsg.Position = oldmsg.Position - UDim2.new(0,0,0,15) end local newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").CustomChat.Frame) newchatline.Text = player.Name.. " : " ..msg newchatline.Size = UDim2.new(3.9,0,0,50) newchatline.Position = UDim2.new(0,0,0,50) newchatline.Font = "SourceSansBold" newchatline.TextColor3 = Color3.new(0.1,0.9,1) newchatline.TextStrokeTransparency = 0 newchatline.BackgroundTransparency = 1 newchatline.BackgroundColor3 = Color3.new(0.2,1,1) newchatline.BorderSizePixel = 0 newchatline.FontSize = "Size18" newchatline.TextXAlignment = "Left" newchatline.TextYAlignment = "Top" newchatline.ClipsDescendants = true newchatline.Name = "line1" end end) end) there are no errors, and it used to work a couple months ago it works in studio mode but not while online, and I assume it has something to do with the first line of code there...
vastqud
#184812439Saturday, March 05, 2016 8:52 PM GMT

in the server log it says that customchat is not a valid member of playergui in studio play solo, it is
vastqud
#184812877Saturday, March 05, 2016 8:58 PM GMT

this is odd I put a script into CustomChat saying print(script.Parent:GetFullName()), and while in online mode I looked at the dev console, and it says game.Players.vastqud.PlayerGui.CustomChat yet, in the server log, it says CustomChat is not a valid member of PlayerGui why?
Casualist
#184813648Saturday, March 05, 2016 9:09 PM GMT

Here's what is happening. Player joins game, player starts to load You assume that once the PlayerGui is created everything that is going to be in it is instantaneously there. You look for it, fail, and error out. PlayerGui things load over time, and you see their output because they do eventually exist. This should have been made obvious when the time stamps showed the server errored out before the script printed the full path.
vastqud
#184813990Saturday, March 05, 2016 9:14 PM GMT

kthnx
vastqud
#184814340Saturday, March 05, 2016 9:19 PM GMT

alright so I added :WaitForChild's in there where needed, but it still doesn't work again, it still prints to full name of the screen gui, which is inside of the playergui there are no more errors, but it just doesn't work
Casualist
#184814660Saturday, March 05, 2016 9:24 PM GMT

This means that the script is hung up on a WaitForChild. Add a print statement before each one to figure out which one hangs, and then you can further address the problem (also, you can use Studio->Test->Start with 1+ players so studio behaves like online mode, but you get to see but the client and server states).
vastqud
#184814859Saturday, March 05, 2016 9:26 PM GMT

after I do that, how can I fix the one that hangs?
vastqud
#184815101Saturday, March 05, 2016 9:29 PM GMT

k, so I did that, and it prints "1" each time, and 1 is the print before the first one. it never prints 2 does that mean its hung up on number 1 or 2?
Casualist
#184817278Saturday, March 05, 2016 10:04 PM GMT

Post code. If the print statements are before the WaitForChilds, it hangs on the first WaitForChild
vastqud
#184820778Saturday, March 05, 2016 11:04 PM GMT

alright here it is: game:GetService('Players').PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) for _,v in ipairs(game:GetService("Players"):GetPlayers()) do print("1") for i,oldmsg in ipairs(v:WaitForChild("PlayerGui"):WaitForChild("chat").Frame:GetChildren()) do oldmsg.Position = oldmsg.Position - UDim2.new(0,0,0,15) if oldmsg.Position == UDim2.new(0,0,0,5) then oldmsg:Destroy() end end print("2") local newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui"):WaitForChild("chat").Frame) newchatline.Text = player.Name.. " : " ..msg newchatline.Size = UDim2.new(3.9,0,0,50) newchatline.Position = UDim2.new(0,0,0,50) newchatline.Font = "SourceSansBold" newchatline.TextColor3 = Color3.new(0.1,0.9,1) newchatline.TextStrokeTransparency = 0 newchatline.BackgroundTransparency = 1 newchatline.BackgroundColor3 = Color3.new(0.2,1,1) newchatline.BorderSizePixel = 0 newchatline.FontSize = "Size18" newchatline.TextXAlignment = "Left" newchatline.TextYAlignment = "Top" newchatline.ClipsDescendants = true newchatline.Name = "line1" end end) end)
Casualist
#184822064Saturday, March 05, 2016 11:24 PM GMT

Originally you where trying to look for "CustomChat", but in your lastest post you call WaitForChild with "chat" if you haven't changed the name of the object to "chat" it won't find it.
vastqud
#184822369Saturday, March 05, 2016 11:29 PM GMT

I did change the name, sorry if that confused you

    of     1