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)
First of all PlayerGUI is nil, because the output says it doesn't exist because you're in studio mode. Second of all, where's the message? You'd need to add something like this, to it.
if msg:lower() == "PUT WHAT TO SAY HERE!!" then
Once you add that in the script, the GUI should work, unless I'm reading this wrong.