So I have this Custom Chat GUI, but I've encountered a very annoying problem. When everything works fine in the studio, it doesn't in the game! I've done solutions such as adding
repeat wait() until game.Players.LocalPlayer ~= nil , repeat wait() until game.Players.LocalPlayer:WaitForChild("Character") , local ChildofPlayer = game.Players.LocalPlayer:FindFirstChild("Character") , at the beginning. Even adding a wait() at the beginning and end didn't help. This has really gotten me very annoyed and I've tried to research this for over a day. Also, nothing shows up in Output except some infinite yield error when I use a WaitForChild.
local Player = game.Players.LocalPlayer
local ChildofPlayer = Player:GetChildren("Character")
local chatbox6 = script.Parent.Parent.MsgChatFrame.chatbox6
script.Parent.msgbar.FocusLost:Connect(function(enter)
if enter then
script.Parent.Parent.MsgChatFrame.chatbox1.Text = script.Parent.Parent.MsgChatFrame.chatbox2.Text
script.Parent.Parent.MsgChatFrame.chatbox2.Text = script.Parent.Parent.MsgChatFrame.chatbox3.Text
script.Parent.Parent.MsgChatFrame.chatbox3.Text = script.Parent.Parent.MsgChatFrame.chatbox4.Text
script.Parent.Parent.MsgChatFrame.chatbox4.Text = script.Parent.Parent.MsgChatFrame.chatbox5.Text
script.Parent.Parent.MsgChatFrame.chatbox5.Text = script.Parent.Parent.MsgChatFrame.chatbox6.Text
script.Parent.Parent.MsgChatFrame.chatbox6.Text = script.Parent.msgbar.Text
script.Parent.msgbar.Text = "Tap the \"/\" button or click here to chat"
chatbox6.Text = " "..Player.Name..": "..chatbox6.Text
end
end)
Someone please help, because I can't stand it

4 comments
Make sure your using LocalScript
It is a localscript
character is a redirection just use player.Character with a wait before it
still not working