How do I fix this insanely annoying problem where scripts work in studio but not game? [Solved]
Asked by
7 years ago Edited 7 years ago
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.
01 | local Player = game.Players.LocalPlayer |
02 | local ChildofPlayer = Player:GetChildren( "Character" ) |
03 | local chatbox 6 = script.Parent.Parent.MsgChatFrame.chatbox 6 |
05 | script.Parent.msgbar.FocusLost:Connect( function (enter) |
07 | script.Parent.Parent.MsgChatFrame.chatbox 1. Text = script.Parent.Parent.MsgChatFrame.chatbox 2. Text |
08 | script.Parent.Parent.MsgChatFrame.chatbox 2. Text = script.Parent.Parent.MsgChatFrame.chatbox 3. Text |
09 | script.Parent.Parent.MsgChatFrame.chatbox 3. Text = script.Parent.Parent.MsgChatFrame.chatbox 4. Text |
10 | script.Parent.Parent.MsgChatFrame.chatbox 4. Text = script.Parent.Parent.MsgChatFrame.chatbox 5. Text |
11 | script.Parent.Parent.MsgChatFrame.chatbox 5. Text = script.Parent.Parent.MsgChatFrame.chatbox 6. Text |
12 | script.Parent.Parent.MsgChatFrame.chatbox 6. Text = script.Parent.msgbar.Text |
13 | script.Parent.msgbar.Text = "Tap the \"/\" button or click here to chat" |
14 | chatbox 6. Text = " " ..Player.Name.. ": " ..chatbox 6. Text |
Someone please help, because I can't stand it