Hello everyone, so I was wondering if there was a way to send a part made from localscript, to server script so that I can then make that part visible for the entire server. I used RemoteEvents, such as:
makeToWorkspaceEvent:FireServer(v)
Where v is the part I want to send, but it always comes up as nil on the server side. Is there any way I can accomplish this? Thank you.
Like the person above said, just make the part server sided, or if that does not work, I suggest showing the code, its not that clear from my perspective.
I just want to set the parent to workspace on the server. Some parts are created differently in the local script so it would be inconvenient since all I want to do is change their parent property…
And then it returns that “nil” cannot have a parent property. So obviously the part is not being passed through. Anyone know how to get around this? That’s what i’m looking for. Thanks.
You simply can’t parent a part made from the client via the server because the part simply does not exist for the server, only for the client, so you should make the part using the server instead.
Clients are ran on you’re computer and you have full access to edit roblox files and create a new localpart.
So the client can be shady. also the 2nd reason is because when a client makes a part. It isnt sent to the server, because some localparts are used for client animations or are oy for the client to see.
The server needs to create parts because so it can be replicated across all clients. and not just one, the bad idea is letting a client replicate them all. like I said in the first paragraph you can edit roblox files on your computer but you cannot edit the server.
Solution
using the RemoteEvent send the server all the properties of the part
create a function on a ServerScript that knows how to create the part without all the properties the client sent. (This is good because the client can send the size of the part to be really huge or worse.) and so that the client can send in less data.