Insert models on the client

Hello, I am currently making a game that is almost 100% client sided, and I need to load a very large number of maps into the game when needed. Currently I have all the maps in ReplicatedStorage and well the performance in studio is becoming very very bad, due to the absurd amount of parts and what not. I would like to just upload each map, and then load it at runtime when needed.

I tried InsertService and it seemed like this would be the perfect thing for the job but for some reason, even if I created the model, it won’t work on the client (which is really lame if you ask me). So I’m wondering if any of you know a good way to solve this issue. I don’t see why there is not a setting to just turn this restriction off, If its a security risk for my game, oh well that’s a risk I’m whiling to take here. Since all players in the game are basically in the same location from the server’s point of view I can’t load them on the server or else maps would be clipping into each other and whatnot.

If there is no way to do this, then I suppose a fallow up would be, is there a way to have something loaded in on the server only replicate to certain clients? Like I could load in a map and then put it in a place only the client that needs it can see, and then the client can mess with it, then have the server delete it when the client is done with it? I just need to make sure when the server removes it the client removes it too.

anyway, any help would be very helpful :3

You cant insert models on the Client unfortunately.

But what I would do is keep all the maps on the Server in ServerStorage, because the Server does not Replicate Items from ServerScriptService or ServerStorage to the Client, you dont need to really worry about performance issues, as they do not exist for the Client.

So to get stuff on the Client, tell the Server to get the Specific Map and load it into ReplicatedStorage (or some place like workspace), but ReplicatedStorage could work if you need yo apply stuff before placing the map, and on the Client, place the map for the Players.

If you no longer need the map, delete it on the Client, and then Remove it from ReplicatedStorage on the Server.

To cross the Server/Client, I recommend you use RemoteEvents and RemoteFunctions, but make sure to secure them so they arent spammed by hackers, and may potentially cause lag to other Player, this can be done by checking to make sure whatever being said by the Client is true.

1 Like

The issue is not performance in game, its performance in studio, I need to get the maps out of studio and then load them at run time, currently studio uses about 8 GB of ram!