OOP Based Tools Help

(My actual first post, first draft got accidentally created as it was unfinished)

Hello developers! I’ve been recently working on an upcoming game and I’m planning to use OOP Based Tools instead of Roblox’s tool instance. I read several posts on this topic but I can’t find a post that suits the way of using OOP that I am looking for (keybinding, tool model replication). What is the best way to go about implementing OOP tools with these factors?

1 Like

It’s really not recommended to use any kind of building plugins.
In case of various services gettind downed (which is very likely last time) there’s high chance of getting impact on Studio - which in Your case may be PluginService not working.
I’d recommend You to use built-in basic tools, as because its actually good choice as well, which just require some parctice and experience

OOP is not a building plugin, it’s a type of programming to lay out code in a neater way. In my case, I’m using this programming method to make a custom tool system instead of using Roblox’s regular tools.

I think OP is talking about using an Object-Oriented approach when building tools instead of just utilizing the functions provided to them by Roblox for tools. E.g Equip, Unequip, Equipped, Unequipped, Activate, Activated.

What do you have so far? Do you have anything to show or any questions you think you may have while programming this system?

2 Likes

I have not started with this system as of yet, but I do have a general idea of how to start. I began this topic in search for ideas on how to implement keybinds and the replication of models for every tool. If you have any ideas on how I can add these onto my system when I begin coding it, please let me know!

What do you mean by the “replication of models”? Does each tool belong to a Roblox model, or do you mean in terms of a Model-View-Controller system, etc.?

By replication of models, I mean each tool has its own model that shows both on the client and the server.

For example: one of the tools are a gun, therefore it has its own gun model and will show up on the gun’s owner’s hand for both the owner and the rest of the server

1 Like

Well, it’s pretty much pointless.
I don’t really find making own tool system usefull.
Deafult Roblox tools is already good enough, with all of it functions and abilities.

I completely disagree. Using my own tool system (using OOP) will allow me to have complete control over how the tool works. Roblox tools are pretty limited when it comes to controlling them.

For input you would use ContextActionService. For the models, you’d have them either in ServerStorage and clone them then place them in the workspace for a specific player (this is more complex than just this). Or you can have your weapon models in ReplicatedStorage and just clone them from the server when you want to use them.

It would honestly be better to fiddle around with it in studio rather than ask about how you should fiddle around in studio. It doesn’t really matter how limited Roblox’s Tools are if you can’t build your own custom one to begin with. I’d recommend putting together a model, working on some functions that let you weld that model to a player, and then making some events that the player can fire in order for it to work on the server.

1 Like

At some points - yeah.
But mostly, it just great and simple option, with handful of all functions, that is required to control the tool.

This might take a few handlers to begin with. I’ll go try to find out what I can do with this system and I’ll you guys know how it turns out.

1 Like

UPDATE: Everything works as intended! Thanks for the help everyone!