Where should I put client-sided services?

In my game, I have a bunch of client-sided services that wrap around roblox services and provide a simple, abstracted interface for me to interact with them (eg: a SignalHandler service that can wrap around any type of signal, whether it be an event or contextactionsignal, and maps it to a string so everything can be consolidated to map to one string)

However, I’m always at odds as to where to put these services.

Currently, I just throw them in a folder in StarterPlayerScripts, but this seems kinda horrible, especially given that I need to keep referencing game.Players.LocalPlayer.StarterPlayerScripts.Services in order to retrieve services.

Plus, for reasons, I need to be able to support adding a different set of services for each Player on the client (eg: Player A would have their own set of Service Singletons, and so would Player B, so that I can do things like easily handle animations separately for each player)

Where should I be putting client sided services?

2 Likes

Nice timing: Client storage improvements

Currently there is no ‘right’ way, but due to path length, somewhere like ReplicatedStorage is probably your best option:

game:GetService("ReplicatedStorage").Services

It’s not much better, though.

3 Likes