Hi, i tried to implement ReplicaService into my game a couple of days ago, but it doesn’t work no matter what i do and i dont know why.
here's my modulescript that holds my replicas:
local module = {
__loaded = false,
_replicas = {},
}
local LoadedSignal = script.LoadedSignal
function module:GetReplicas()
if (not self.__loaded) then
LoadedSignal.Event:Wait()
end
return module._replicas
end
return module
here's the script that populates the modulescript holding my replicas:
local ReplicaController = require(game:GetService("ReplicatedStorage").Lib.ReplicaController)
local replicasModule = require(script.Parent)
local loadedSignal = script.Parent.LoadedSignal
ReplicaController.ReplicaOfClassCreated("Time", function(replica)
replicasModule._replicas[replica.Class] = replica
end)
ReplicaController.RequestData()
replicasModule.__loaded = true
loadedSignal:Fire()
And here's the output in the console
[ReplicaController]: Initial data received - Client - ReplicaController:974
ServerScriptService.Lib.ReplicaService:410: attempt to index number with 'Type' - Server - ReplicaService:410
Stack Begin - Studio
Script 'ServerScriptService.Lib.ReplicaService', Line 410 - function SetValue - Studio - ReplicaService:410
Script 'ServerScriptService.Match', Line 53 - Studio - Match:53
Stack End - Studio
Looks like this has been an issue for at least a few weeks. How did you install ReplicaService? You may need to downgrade to a version that didn’t have this issue.
Oh lol. I haven’t used ReplicaService before so sorry I probably can’t help you with this.
I couldn’t find anyone else experiencing the same issue. Even newcomers seem like they aren’t having that issue so maybe it’s something with how you set it up or installed it? Not sure.
It sounds like you installed it from Roblox? That model was last updated in Nov, 2020. I’d try installing it from GitHub directly since it’s more up-to-date. The developer doesn’t seem to update the model along with the GitHub.
Nvm, I read wrong; it was updated recently. The GitHub does have a history of the changes though so you can look at previous versions and try those out.
I still have the same error, and it seems that the problematic lines of code were always there.
Do you know if the developer has a Discord server? I can’t find ways to contact other people that uses ReplicaService, even in his Github.
Actually the group’s page has a discord link. I don’t know if it has a channel for ReplicaService but it might be worth checking out. Good luck on the issue