So i dont really know whats wrong so can someone please help?
21:15:55.691 - Players.Player1.PlayerGui.Chat.Chatted:3: attempt to index field 'PlayerGui' (a nil value) 21:15:55.692 - Script 'Players.Player1.PlayerGui.Chat.Chatted', Line 3 21:15:55.695 - stack end
wait(10)
players = game.Players:GetChildren()
chats = players.PlayerGui.Chat.ChatBounds:GetChildren()-- line 3
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
copy = script.Parent.ChatPlayer:Clone()
copy.Text = player.Name
copy.ChatText.Text = msg
copy.Position = UDim2.new(0,0,0,100)
for i = 1,#chats do
chats[i].Position = UDim2.new(0,0,0,chats[i].Position.Y.Offset - 20)
end
copy.Parent = players.PlayerGui.Chat.ChatBounds
end)
end)

4 comments
game.Players.PLAYER.PlayerGui not game.Players.PlayerGui and since players is a table and you are trying to index a nil value it wouldn't matter if you got the hierarchy wrong anyway. What you probably meant to do is make players = game.Players and make chats = game.Player.LocalPlayer.PlayerGui.Chat..
can you fix it for me?
Nope, I don't even understand how it's supposed to work. The only suggestion that I have is to recode it. I made a chat GUI awhile back that could be a decent reference if you can't fix it and end up restarting.
ok i found yours but i dont know how it works