How can I go about making a mini egg hunt quest for my game?

I want to try making an egg hunt event for my game, there are several kits out there and a few tutorials but none of them do what I want them to.

All I’m asking is for the local player to find about 5 eggs manually hidden in the world, when the local player has collected all of their eggs on their client then they will be awarded with a badge.

I see a lot of non official egg hunt games have a simple system like this. No fancy guis or inventory systems, just touch every egg and get rewarded with a badge. If I could get a template or tutorial for something like that then that would be nice.

1 Like

I would suggest having the eggs around the map, but have them in a model.
You can check the number of eggs in that model each time the player collects one, and once they’re finished you can use InvokeServer on a RemoteFunction to give the player a badge once they have all the eggs.

If you’re looking for a quest system, I think the best way to get started is using a ModuleScript to handle your quest system.

Making this on the server would be easier and better.
Make a simple counting system, detect when the player touches an egg on the workspace, increase the count, when the count goes to 5, give the player the badge.
This would also prevent exploiters.

Would that work in a multiplayer server because I don’t want everyone to randomly get the badge when one person finds all the eggs.

I actually made something similar, but with coins.

  1. Make a Folder and parent it to the player.
  2. Make 5 BoolValues and parent them to that folder.
  3. Name every Value something like ‘Egg1’, ‘Egg2’, etc.
  4. Inside of every egg, make a touched event that changes the corresponding value to true.
  5. Make a LocalScript inside of StarterPlayerScripts and make a Changed event checking if they own all of them, if they do, fire a RemoteEvent that awards the badge to the player the Event was fired from.
  6. Make a DataStore saving al the values when a player leaves and make it load back in when they rejoin.

This is roughly how I did it, I was too dumb to actually save the scripts I wrote for the actual event and the even isnt in the main game anymore, so I couldn’t see exactly how I did it. :frowning:

Hope this helped ya!

Edit: For anti exploit you could just make it check again if they have all those values to true after the event was fired.

1 Like