Part is returned as "nil" with Remote event

I’ve been trying to change collision on a part on game >Map > CES_Door, inside it, there’s a Script that sends a **Remote:FireServer() to a LocalScript that’s inside StarterPlayer > StarterPlayerScripts, I tried to print out the part in the script, it printed it just fine, but as soon as I pass the part through the fireClient() from the remote Event, the part is suddently nil.

I have no idea what caused it, neither how to fix it. This may be a bug.

(LOCAL SCRIPT) StarterPlayer > StarterPlayerScripts > LocalDoorHandler

if part == nil then return warn("Part doesn't exist.") end

   part.CanCollide = false
   part.CanQuery = false

:arrow_up: | Says that “part” doesn’t exist. (But it does.)

(Script) game >Map > CES_Door > DoorHandler

local Remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents"):WaitForChild("DoorHandlerRemote")
local players = game:GetService("Players")

	if player:IsInGroup(IHidTheGroupIdSoUDontKnowHehe) then
		Remote:FireClient(player, script.Parent)

Any way I can fix this issue? I’ve ran out of fixes, I’ve tried re-writing the entire code. But nothing seems to change it.

Don’t pass an instance through a RemoteEvent. Instead, pass something it can be identified by, like a name, for example.

There are multiple parts that are named the same though.

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