Hey, I am creating a custom chat gui.
The issue is that I am following the correct path to reach a frame called ‘Main’, yet the script thinks it doesn’t exist…
Here is my code:
local rs = game:GetService("ReplicatedStorage")
local msgTemplate = script:WaitForChild("Message")
local uis = game:GetService("UserInputService")
local chat = script.Parent:WaitForChild("Chat")
local list = chat:WaitForChild("Main"):WaitForChild("List") -- This line
rs:WaitForChild("LogChatRE").OnClientEvent:Connect(function(sender, message)
if sender and message then
local temp = msgTemplate:Clone()
temp.MessageText.Text = tostring(sender.Name)..": "..tostring(message)
temp.Parent = list
end
end)
uis.InputBegan:Connect(function(input, GPE)
if input.KeyCode == Enum.KeyCode.Return then
print("Enter pressed!")
end
end)
Here is the heirarchy:
