How would I achieve this?

I don’t know if this is supposed to go in the Scripting Support category but, I’m trying to make a system that has three different types of item’s: tool, object, weapon. tool is going to have stuff like a flashlight with an onOff toggle, weapon is going to be stuff like a gun or melee weapon, and object is going to be something that can be dropped and picked up. I wanted to make this system with composition because it is Modular and allows me to quickly make new items that have certain functions and stuff, but I’m more of a hands on learner and no matter how I think about it, I don’t know how this system would work or how I’m supposed to make it work. I have looked extensively at a lot of sources that explain composition and oop, including some for specifically roblox, but nonetheless I still don’t know how I would do this. Sorry If this doesn’t make very much sense I’m not very good at wording things.

any type of help is appreciated, whether it be a source for composition, an example of how I would do this or an example of composition. Thanks!

The roblox forum is more for fixing bugs, talking with peers, and communicating about developing. Most people won’t give you a system, plus its always better if you make one yourself.

I’d suggest trying to figure out how to make this type of system by yourself, and as you encounter specific issues you should ask questions. Pretty much anyone on the website would be happy to help if its a specific issue (not a full system layout).

I’m not specifically asking for a system, I’m asking for help on how one would be made, words are helpful I do not need a system, even just links to other people’s composition/oop posts would be helpful.

he is in your words “Communicating about developing”

1 Like

I use the rubber duck method to break down my ideas so here’s a way to think of executing this

Tool: If Activated then Turn light on else turn light off

Weapon if E is pressed then fireserver then that script deletes the tool from backpack and makes a duplicate in workspace

Object: same as e but with a similar system yknow

This is a very general way of thinking but it helps me get it down even if its vague

Communicating as in helping. You can’t answer a question if there is no question in the first place.