Sending part info over Remote Function?
I'm trying to essentially clone a part from a local script, and put it into the game.
After reading this, https://devforum.roblox.com/t/sending-a-cloned-object-to-the-server-through-a-remote-event/347281/4
I learned it would probably be easier for me to just make a different part with essentially the same properties.
I've tried a .OnServerInvoke on a remote function, and a .OnServerEvent with a remote event.
I don't think I'm transferring the info right? I've followed a few tutorials and looked at some blog posts and thought I'm doing it right but I guess not?
Local Script
1 | local partsize = newpart.Size |
2 | local partposition = newpart.Position |
3 | local partcolor = newpart.Color |
4 | local partmaterial = newpart.Material |
5 | local partshape = newpart.Shape |
6 | game.ReplicatedStorage.brickplace:FireServer(partsize, partposition, partcolor, partmaterial, partshape) |
Server Script
1 | game.ReplicatedStorage.brickplace.OnServerEvent:Connect( function (player, partsize, partposition, partcolor, partmaterial, partshape) |
2 | local part = Instance.new( "Part" ) |
4 | part.Parent = game.Workspace |
5 | part.Position = Vector 3. new(partposition) |
6 | part.Size = Vector 3. new(partsize) |
7 | part.Color = Color 3. new(partcolor) |
I'm not getting any errors, but the part being made is becoming essentially blank for all things. So the color is 0,0,0 (black) the size is is like 0.05,0.05,0.05, position is 0,0,0 etc
What exactly did I do wrong?