I have made custom module for replacing the TweenService, now i want to access it and i got a very cool idea to make it very easily accessible from multiple scripts, i want it because i want to feel like it is the real service and real services you don't get them like this:
local tweenService = replicatedStorage.modules.container.otherstuff.......
But like this:
local tweenService = game:GetService("TweenService")
So my shorter idea was to parent it to the game
script.Parent = game
I could create module which would do that in studio as you can't parent it to the game in explorer but the question is, is it good idea or should i forget about it, no, trash idea?
Thanks, kirda
I would not, the game object is basically the whole game in example.
game.Players
We are using that game object to get the Players Service. I would either use Workspace or SeverScriptService (For a sever script)
(After reading your question more)
You can just put the module script into SeverScriptStorage.
To access the module script,
local SeverScriptService = game:GetService("SeverScriptService") local ModuleScript = require(SeverScriptService.TweenModule)
Sources https://developer.roblox.com/en-us/articles/modulescripts https://developer.roblox.com/en-us/api-reference/function/ServiceProvider/GetService
Skippy