[SOLVED] Remote Event Returning "Nil" as passed arguments

Hello. I’m trying to relay some passed arguments from a modulescript to a client, but it doesn’t appear to be working. It tends to return ‘Nil’

--SERVER--
GridModule.CreateGrid(Vector3.new(0,0,0), 10, 5)

--MODULE--
function UtilityModule.CreateGrid(InitialPosition, XLength, ZLength, filter)
	local coordSending = game.ServerStorage.Bindables:WaitForChild("CoordManager")
	local clientGridCreation = game.ReplicatedStorage.Remotes:WaitForChild("ClientGridCreation")
	clientGridCreation:FireAllClients(InitialPosition, XLength, ZLength)

--CLIENT--
local gridCreate = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("ClientGridCreation")
local function testFunction(Initial, XLength, ZLength)
	print(Initial, XLength, ZLength)
end

gridCreate.OnClientEvent:Connect(testFunction()) --Returns (nil, nil, nil)

Any help would be greatly appreciated.

This may not make a difference but could you try this:

gridCreate.OnClientEvent:Connect(testFunction)

your idea should solve the issue

Solution Found. No need for further assistance.

1 Like