I made a script that should replicate an object stored in ServerStorage and put it into the workspace. I have FE enabled, so I tried putting it into the replicated storage. Even so, when it runs I cannot see the model even when I teleport my player to it's position via the server log. So, can anyone explain why this model will not replicate to the clients?

I know this would work if I put these objects into ReplicatedStorage, but I don't want players to be able to access these models and exploit.

Info[1] = The name of the model Info[2] = The position that the model will be moved to

	local NewBld = game.ServerStorage.BuildingStorage:FindFirstChild(Info[1]):Clone()
	NewBld.Parent = game.ReplicatedStorage
	Inventories[Player.UserId]["Buildings"][#Inventories[Player.UserId]["Buildings"] + 1] = NewBld		
	NewBld.Parent = game.Workspace
	NewBld:MoveTo(Info[2])

7 comments

0

Why copy the... map I am assuming ...to ReplicatedStorage if you're just going to make it end up in Workspace? Also, the script is probably erroring out on line 3 trying to figure out what the heck Inventories is. Also, if you're trying to define a new building in Inventories, then NewBld = should be first, not the object then the variable. Please go into deeper detail of what you're trying to do.

0

There are no errors, and also the inventories is a predetermined table. I put it into replicated storage that way it would actually be visible to the client, although that wouldn't work. The inventories is used as storage to track everything that the players contain in their inventories.

0

So wait, are you taking something from ServerStorage, running it through ReplicatedStorage, then cloning it to Workspace?

0

What I am trying to do is clone a model from serverstorage and I want it to end up into workspace. Moving the clone into replicated storage is just an attempt at trying to get the model to actually show up on the clients.

0

Anything added to workspace via the server will replicate to the clients. So skip the step where you try cloning it to ReplicatedStorage and just clone it to Workspace.

0

That didn't work at all. It produced the same result.

0

LocalScripts (which can only run on a client) CANNOT access ServerStorage. Instead, clone the model into the Workspace on the Server, and it will be replicated to the clients automatically