RBLXScriptSignal not getting trough remote event

Hello, i’m currently having issue sending Script signals trough remote events.

When the client receives it, it becomes nil for some reasons.

Here is the test code, please dont mind the mess, it is a test code.
Server

wait(1)
game.ReplicatedStorage.RemoteEvent:FireAllClients(game:GetService("UserInputService").InputBegan)

Local

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(Event)
	print(Event)
end)

Thank for the help!

You can just do this instead:

Local

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(OnInput)
	game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
 		-- your code goes here
	end)
end)

Server

wait(1)
game.ReplicatedStorage.RemoteEvent:FireAllClients()

Yeah i forgot to mention but the actual code uses this to be able to create dynamic events so i dont have to check trough all UserInputService and VRService event. So this wont work.

Are you using the input event for VR?

Yeah and for another thing that requires UserInputService.

Yea but you can send an event to the server for every keycode pressed on the client or for certain keycodes
You can also check VR inputs using UserInputService

Yeah i know, that was the base plan but for security reasons i have to do that else exploiters would be able to teleport themselves and even they could mess with other player because it is not a classic VR system.