Hello, sorry for bumping on this topic. I have a question regarding this module in itself:
- Does it support typechecking? (i.e: I have a module that’s based on typechecking; meaning I’d have to define the type for it to work.) Previously, I’m using ProfileService, however; it doesn’t seem to have any typecheck support unfortunately.
type ModuleObject = {
Name: string,
Data: CustomDataStore? -- like this...
} & Methods;
type Methods = {
. . .
}
- Is there a proper way to determine if a data is loaded or not (i.e: Signal) (and also a way to handle data that failed to load?) I have a custom player loading system, where the client will send an event to the server and the server will verify that player’s custom class object. I wanna make sure that their data is loaded properly before they are verified (AKA prevent exploiters from bypassing their load before their data is even fully loaded if that makes sense.)
Event.Load:Connect(function(player: Player): boolean
local playerObject = PlayerService:GetPlayer(player) -- custom PlayerService module; returns player object
if playerObject then
-- data is a BasicState (a public resource module)
if not playerObject.Data:Get("IsLoaded") then
-- Mark player data as loaded and signal player loading.
playerObject.Data:Set("IsLoaded", true)
PlayerService.Signal.PlayerLoaded:Fire(playerObject)
return true
end
end
return false
end)
- Does this module support the use of ReplicaService? My game heavily rely on the use of Replicas to communicate between client/server.