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
Remote.OnClientEvent:Connect(function(part)
if part == nil then return warn("Part doesn't exist.") end
part.CanCollide = false
part.CanQuery = false
end)
| 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")
players.PlayerAdded:Connect(function(player)
if player:IsInGroup(IHidTheGroupIdSoUDontKnowHehe) then
Remote:FireClient(player, script.Parent)
end
end)
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.