Basic_Egg is not a valid member of Folder "Workspace.Eggs" - At this point I do not know what the hell is going on

local Workspace = game:GetService("Workspace")

local EggsFolder = Workspace.Eggs

local EggConfig = require(ReplicatedStorage.Config.Eggs)

local function GenerateBillboardGUI(eggModel: Instance, eggConfig)
	local attachment = eggModel:FindFirstChild("Attachment")
	local clone = Template:Clone()
	clone.Parent = script.Parent
	clone.Adornee = attachment
	clone.Name = eggModel.Name
	
	clone.Frame.Title.Title.Text = eggModel.Name:gsub("_", " ")
	clone.Frame.Price.Price.Text = "💰 "..eggConfig.Price
	
	for _, pet in ipairs(eggConfig.Pets) do
		GeneratePet(clone.Frame.Container, pet)
	end
end

GenerateBillboardGUI(EggsFolder.Basic_Egg, EggConfig.Basic_Egg)

(not full script)

basically it returns

Basic_Egg is not a valid member of Folder "Workspace.Eggs"  -  Client - Handler:51
51: GenerateBillboardGUI(EggsFolder.Basic_Egg, EggConfig.Basic_Egg)

it is valid…
image

image of eggs after game has been run for 5 seconds (just to clarify for those people who might say that something have potentially deleted it)

image

Try replacing

local EggsFolder = Workspace.Eggs

-- with
local EggsFolder = Workspace:WaitForChild("Eggs")

it’s a simple fix that should work as it may be running before the Eggs folders gets replicated to the client. Also as a note you don’t need to GetService Workspace as you can just use workspace/Workspace alone

The funny thing is that I just did that before posting this starting with by using :WaitForChild() which gave the same result

:skull: Basic_Egg is not a valid member of Folder "Workspace.Eggs" - Client - Handler:51

Also tried it with

GenerateBillboardGUI(EggsFolder:WaitForChild("Basic_Egg"), EggConfig.Basic_Egg)

and I have tried with FindFirstChild and tried to define workspace in another way and also to rename the eggs as a final attempt which failed too. (when I renamed egg, then I obviously changed all stuff in the script too and then I reverted it as it did not work either)

And I did try again after you said it so you can be sure yourself.

image

Roblox is down as it got a 503 status. that might be why.

I got logged out automatically from creator hub and

Well this sure as hell is confusing although I had an issue like this happen before and it only replicated in studio so try publishing to a private game and running it within roblox its self and yes the 503 status is coming up for me as well so yeah you can’t do crap with a broken application :skull:

Try

GenerateBillboardGUI(
    EggsFolder:FindFirstChild("Basic_Egg") or EggsFolder:WaitForChild("Basic_Egg"),
    EggConfig.Basic_Egg
)

or

local Basic_Egg = EggsFolder:FindFirstChild("Basic_Egg") or EggsFolder:WaitForChild("Basic_Egg")

GenerateBillboardGUI(
    Basic_Egg,
    EggConfig.Basic_Egg
)

The issue was that ROBLOX was down.

1 Like

anyways you fixed the issue… :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.