How to make a Trick Or Treat system in Roblox?

How to make a Trick Or Treat system?
Can someone help me or giving me some hint of how it works?
I want to make a Halloween game because Halloween is near and maybe we can’t celebrate it outside because of the new virus is spreading, so maybe we can celebrate it in Roblox instead.

This is like involving trading, I can’t give you the full script.

Perhaps use a gear as a candy bag, and when you touch a door, it will open and a person will come outside and give you digital candy (yes, digital :open_mouth:). This seems like a pretty easy task to accomplish and a good one to build off of for more content and add-ons.

Here’s a base for it.

Make a tool that’s a candy bag, and then make a script that handles left-mouse clicks or a clickdetector on the door of the house. Use tweenservice to make the door tween open, and then use math.random() to make it randomize the chances of getting tricked or getting a treat. The treat can be a tool, or maybe an update a point value. The trick can be something like getting bigger in size, or spinning for an infinite amount of time. (basic stuff, you don’t need to make it advanced.)

1 Like

And digital candy can maybe be used to buy things in a shop. But if you want those things to save when you leave the game, it would be a bit hard to script a datastore script to save the data, if you ask me.

It’s quite simple, basically have a script were if you go up to a house and click on a doorbell or whatever someone appears and randomly gives you a amount of candy.

Maybe you Have sme sort of Leaderstats and when you go to a house it gives you a certain amount of candy