Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Argument 1 missing or nil error with RemoteFunction?

Hello, Im trying to write a script where when you sit in the seat part of the car model I made, you get anchored down and it fires a remote function. But when I test it, in the output it says "Argument 1 missing or nil" and Im confused because this only happens when I Invoke a remote function. Here's the script

local Seat = game.Workspace.Jeep.Seat

Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	if Seat.Occupant ~= nil then
		wait(.5)
		local Char = Seat.Occupant.Parent
		Char["HumanoidRootPart"].Anchored = true
		if Char["HumanoidRootPart"].Anchored == true then

			game.ReplicatedStorage.Drive:InvokeClient()
		end
	end
end)

1 comment

0

Accept the guy's answer (irid_leas)

1 answer

✓ Accepted answer

InvokeClient requires the first argument to be a player. by calling InvokeClient as empty, you're not actually specifying which player the function would invoke on.

1 comment

0

Tysm

This discussion is preserved as it was. New answers, comments, and votes are closed.