How to send client made model to server

So a client makes a model which only exists to the client, and i want to make a system were the model just gets sent so players can see.

I tried using instance.fromexisting() but that does not work because a localscript made the model. Cloning does not work because in the serverside says the model is nil.

How about send it to all the other clients instead of the server?

But does that require giving it to the server to send to the other clients?

I looked around and yeah you cant send models or parts over to the server directly like that. Do you need to create it on the client or not? If not just use a remote event for whenever you want the client to summon this model it sends a remote to the server and connects then you have your functionality.

A player has to create it on the client, but i stored the models data in a datastore.

Oh if you have all the data then send it to the server if im not mistaken

I never thought of that! Thanks.

1 Like

you’d need to serialize all the instances; i.e. put all the relevant properties of every part into an array consisting of values you can pass through remote events (strings, numbers), and then reconstruct the parts using those properties. Something like this for example:

{
                    [1] =  ▼  {
                       ["Anchored"] = false,
                       ["BrickColor"] = Maroon,
                       ["CFrame"] = -18, 0.5, -3.99999809, 1, 0, 0, 0, 1, 0, 0, 0, 1,
                       ["Name"] = "Part",
                       ["Shape"] = Block,
                       ["Size"] = 4, 1, 2
                    },
                    [2] =  ▼  {
                       ["Anchored"] = false,
                       ["BrickColor"] = Earth green,
                       ["CFrame"] = -17, 2.5, -3.99999809, 0, 0, 1, 1, 0, 0, 0, 1, 0,
                       ["Name"] = "Part",
                       ["Shape"] = Cylinder,
                       ["Size"] = 3, 2, 1
                    },
                    [3] =  ▼  {
                       ["Anchored"] = false,
                       ["BrickColor"] = Navy blue,
                       ["CFrame"] = -17.5, 5, -3.99999809, 0, 0, 1, 0, 1, -0, -1, 0, 0,
                       ["Name"] = "Part",
                       ["Shape"] = Wedge,
                       ["Size"] = 1, 2, 2
                    }
                 }
1 Like

Ok thanks i was about to research how to load in the model with a datastore. But not any longer.

1 Like

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