ReplicaService:410: attempt to index number with 'Type'

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

thank you for reading, please help me!

bumping this, i really need help! its so frustrating, ive been trying to fix this since a week ago!

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.

2 Likes

I am the person that made the issue, and I can’t figure out how to get an older version of the model.

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.

Checked it again and the model was updated on 16th of July, 2024.
EDIT: Ok, going to try installing it from Github.

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.

None that I know of. I only see the github and original Roblox forum post =/

Oh, well. Thank you for helping!

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

1 Like

Oh wow, thank you so much!!!!

EDIT: it doesn’t have a developer section, it’s only for the players of the studio’s games😞

1 Like

Fixed it by replacing the use of replica:SetValues() calls by replica:SetValue(). It’s repetitive to set multiple values, but atleast it works!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.