''Argument 1 missing or nil'' Error Remote Event

Hi, how to fix this error?

local function onPlayerAdded(player)
	local success, currentExperience = pcall(function()
		return experienceStore:GetAsync("user_" ..player.UserId)
	end)
	task.wait(3)
	if currentExperience == "no" then
		RemoteEvent6:FireClient()
	else
		RemoteEvent7:FireClient() -- this error
	end
end
1 Like

:FireClient() needs to have a Player argument,
Fixed Script:

local function onPlayerAdded(player)
	local success, currentExperience = pcall(function()
		return experienceStore:GetAsync("user_" ..player.UserId)
	end)
	task.wait(3)
	if currentExperience == "no" then
		RemoteEvent6:FireClient(player)
	else
		RemoteEvent7:FireClient(player) -- this error
	end
end
1 Like

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