Evercyan's Egg Hunt Kit

you complete butter scripting god.

The Problem still occurs for me. I dont know why but the Eggs wont show in the Egg list for me

robloxapp-20210406-0119069.wmv (2.0 MB)

I think it has to do with something on your end Alejandro. Reinstall it and make sure you are placing all the folders in the exact correct location. A default install works fine for me, even with all my additional eggs I added. I just doesn’t live update. So the player has to log out and back in for the list to update.

robloxapp-20210405-1907407.wmv (1.7 MB)

1 Like

If I drag the childerns folders of the Main folder to the Services it gives me this Error/s.
It dosent work aswell if i put the contains of the Child Folder of the Main Folder to thier Services.

I dont know but if I do it like it describes it in the Setup it gives me the Bug with the Egglist again. It would be nice if you could send me a picture of the Explorer with the Kit being Setup. So i can try to fix it myself.

I’m at work for the night but as soon as I’m home I’ll show you a screenshot of my interface menu for comparison.

Hope this helps. Tried to hide as much of my non egg hunt stuff as possible to not confuse but the just like his script says.

  • EggSpawns folder in Workspace.
  • Eggs, Modules, Remotes, and PlayerEggHuntData folders all go inside ReplicatedStorage.
  • EggHuntMain script inside ServerScriptService.
  • Modules folder inside ServerStorage.
  • and lastly the EggPanel and NotificationUI inside StarterGUI

One final thing, Try publishing the game and testing it on a live server. When Data stuff is being used it doesn’t work right testing in studio very often. I didn’t work right when I tested in Studio, I had to pushlish it and it works great now.

2 Likes

Good question!

To give out a badge to players who have all the eggs, you’ll need to use an event listener in the player’s egg data folder. This can be found under ReplicatedStorage.PlayerEggHuntData.Eggs. Each time a player collects an egg or joins the game, you should run a function to compare the number of children in the Eggs folder (#Instance:GetChildren()) and the number of eggs (EggHuntContentLib.Count). If both of them are equal to (==) the same number, then you can award the badge using some of BadgeService’s functions.

Here’s an example:

--> Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")

--> References
local PlayerEggHuntData = ReplicatedStorage.PlayerEggHuntData

--> Modules
local EggHuntContentLib = require(ReplicatedStorage.Modules.EggHuntContentLib)

--> Configuration
local BadgeId = 00000000

----

local function OnPlayerAdded(Player)
	local pEggs = PlayerEggHuntData:WaitForChild(Player.UserId) and PlayerEggHuntData[Player.UserId]:WaitForChild("Eggs")
	local Ran
	
	local function EggsChanged()
		local AllEggsOwned = #pEggs:GetChildren() == EggHuntContentLib.Count
		
		if AllEggsOwned and not Ran then
			Ran = true
			
			pcall(function()
				if not BadgeService:UserHasBadgeAsync(Player.UserId, BadgeId) then
					BadgeService:AwardBadge(Player.UserId, BadgeId)
				end
			end)
		end
	end
	
	pEggs.ChildAdded:Connect(EggsChanged)
	EggsChanged()
end

Players.PlayerAdded:Connect(OnPlayerAdded)
for _, Player in pairs(Players:GetPlayers()) do
	OnPlayerAdded(Player)
end
2 Likes

Thank you so much! Again, great system. Amazing contribution! My friends loved using it yesterday. :smiley:

2 Likes

I put all eggs in the “Eggs” folder, but it’s not appearing ingame.

I have followed all steps… reinstalled it. Tested in a Live Server. Even i have set the Badge ID to nil since i dont have any badge to award… It still dont work. The Eggs wont show up in the list.

I am sorry you are having this issue Alejandro. I just tested the module in a new blank world and it works fine for me there too. I can’t for the life of me figure out why it works on multiple levels for myself and others but not you. :frowning:

RBLX_Vertivus The sister works, are you waiting to watch for to spawn? make sure all the modules are in the right folder and you tested on a live server?

Hey,

Do you mind showing me your explorer setup and errors if there’s any in the output?

2 Likes

There arent any Errors in the Output.

@AlejandroDZ
@RBLX_Vurtivus

Do both of you think you could show me your Explorer expanded to show all the contents of the egg hunt kit?

2 Likes

Maybe deactivate rodefender, it might’ve seen some scripts as malicious :wink:

Sorry for bumping this post, but I really need some help with this kit.

Every time I try add an egg into the replicated storage egg folder, it warns me telling that the primary part for said egg does not exist.

However, for the Basic Egg of 2020, I seen that it does not have a primary part, but it still spawns and works as intended.
Screenshot 2022-10-03 184307

The Basic Egg is the deafult egg that came with the kit. The Admin Egg is my own egg. I did not change the script to make it not spawn. I do not know what I am doing wrong.

Nevermind, I just copied and pasted the Basic Egg again and copied the mesh and texture ids that I need into the new copy. It works now.

Also, I know no one will read this since the last reply apart from mine is over a year old, but how would I script in a gamepass where it will drop all eggs from the spawn part. I already know how to script the gamepass, I want to learn the part where it makes all eggs rain.

How may I go about adding different categories for the egg list. I have added in the egg config the category I want to add, I have also added in the eggpanelscript the correct category info. However when i go into game to see the categories It doesn’t show up on the list, it just shows “All”.