Development discussion isn’t the right category. This should go in Help and feedback.
I disagree with making those if they are “Simple”. Hundreds of them already exist and little to no one uses half of them. Only a few stand out. Though, if you are experimenting with it, don’t hesitate to continue!
Are you sure beginners are able to use and understand how module scripts work? A million of those exist. The most prominent ones are Datastore2, ProfileService etc. And I recommend beginners to learn how to use the Roblox Api and then Datastore2 or profile service.
And doing stuff like:
function module:Set(key, value)
Datastore:SetAsync(key, value)
end
For easy development, math heavy functions, I honestly suck at math and as a beginner I would of just given up had it come to math, If you create a math-targetted API, doing functions, lerping through things, mathematical things then you’ll help people out.
Another hard concept was raycasting, it was kinda tricky to understand it back then as a beginner.
But ake sure to ofer a tutorial or two from roblox whilst they develop because it will help them alot.
That is very misleading. You cannot create new services because roblox does not allow you to do so. Datastore2 isn’t a service. Its a library/module. You can only create modules for the same that can be used using require(), not GetService().
yeah but if you’re going to require a module for help, then this module can provide a getComponent function to help get components which can be utilise in actual code. Like sub-modules for a main module.
i’m talking about making getComponent a thing when you require the module lol.
all of my frameworks are built on modules, so :getComponent is apart of the game instance. Sorry if I was being misleading in my message
I think adding a shop that saves your purchases would be very helpful for beginners.
It’s a little bit annoying that it’s hard to just save simple things using Roblox datastores.
local module = {}
function module:GetService(ServiceName)
setmetatable(ServiceName, {
__index = function()
return {
warn("Couldn't Find The Service.")
}
end;
})
for Service, _ in pairs(script:GetChildren()) do
if ServiceName == script[Service] then
require(script[ServiceName])
end
end
end
return module
Main:
local ServicesModule = require(script.Services)
ServicesModule:GetService("Example1")
You’ll need to require the module first, and then require the other module…
If you were working with multiple scripts, that’s so redundant. You are basically writing that whole code just to do require(path.to.module). So whats the point?
Services Managing Module Requires The Services Inside It By Using :GetService, Main Script Requires The Service Managing Module That Requires The Modules Inside The Modulescript;
The code is going to produce errors since the setmetatable part is incorrect. script[Service] will also produce errors. You are requiring the module script inside the function but never returning it, hence the required module can’t be used outside of the Service module.