Remote Objects Parented To Nil Never Fire

Repro: Remote Objects Need Parent Repro.rbxl (11.1 KB)

This is a bit of an interesting bug. I wanted to try to parent the RemoteEvents and RemoteFunctions in my game to nil to prevent people finding them and sending false requests to the server easily, or serialize them with a geometry stealing exploit. But… they don’t fire to the server if they aren’t parented.

I am not sure if this is a bug or intended to happen. I assume it is a bug, but I doubt this type of set-up is/will be supported.

1 Like

This is because instances parented to nil don’t replicate. If you want the client to be able to communicate with the server but not risk exploiters fudging data, the only thing you can do are server-side sanity checks.

As long as you can reference the RemoteEvents/Functions from LocalScripts you can set their parent to nil in the client as long as they aren’t parented to nil when you fire or invoke them.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.RemoteEvent

local function foo(data)
	RemoteEvent.Parent = ReplicatedStorage
	RemoteEvent.Parent = nil

RemoteEvent.Parent = nil

I’m not sure if there are exploits to retrieve stuff from nil but otherwise it doesn’t hurt to ‘cover up’ Remotes or LocalScripts.