Why can't the server side remoteEvent detect objects?
I was creating a building system, and I wanted to make the placement server-sided, so I added a remote event into ReplicatedStorage
and had this portion of a LocalScript
typed up:
(it's specificly this part that isnt working)
02 | local place = clone:Clone() |
03 | place.Parent = workspace |
04 | place.PrimaryPart.Transparency = 0 |
05 | place.PrimaryPart.CanCollide = true |
08 | mouse.Button 1 Down:Connect( function () |
09 | game.ReplicatedStorage.PlaceItem:FireServer(clone) |
then, I made a ServerScript
in the ServerScriptService
and typed up:
1 | game.ReplicatedStorage.PlaceItem.OnServerEvent:Connect( function (player,clone) |
2 | local place = clone:Clone() |
3 | place.Parent = workspace |
4 | place.PrimaryPart.Transparency = 0 |
5 | place.PrimaryPart.CanCollide = true |
However, it keeps saying that the clone in the serverscript is nil. I clearly defined the object, but it's not detecting it.
What on earth??!!
Help please!