Players.Auevi.PlayerScripts.LocalScript:85: attempt to index nil with ‘FindFirstChild’
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--local UserInput = game:GetService("UserInputService")
local AvatarEditor = ReplicatedStorage.AvatarEditor
local mainGui = AvatarEditor:FindFirstChild("AvatarEditorGui")
local editorFrame = mainGui:FindFirstChild("Frame")["Editor"]
-- above is the specific line
local footer = editorFrame.Footer
local doneButton = footer.Done
local Debounce = false
AvatarPart.Touched:Connect(function(hit)
if not Debounce then
Debounce = true
AE:Load()
else
if doneButton.Activated then
AE:Destroy()
Debounce = false
end
end
end)
Players.Auevi.PlayerScripts.LocalScript:86: attempt to index nil with ‘WaitForChild’
How am I able to see if AvatarEditorGui and Frame are valid?
EDIT: From my current understanding of what valid means, they’re valid. AvatarEditorGui is a child/member of mainGui and Frame is a child/member of editorFrame.