Argument 1 missing or nil error Remote functions

I am trying to return a value from a remote function but output keeps giving me argument 1 missing error

https://gyazo.com/fa54397cc10f2199c7e1c227723db80a

https://gyazo.com/b3649f04b5d8cf638944774e95a362d5
I have tried changing how I return the values but still no luck please help this is very frustrating because there are no tutorials on returning values remote functions

2 Likes

You’re trying to reference the function, but you end up calling it (attempting to set the reference to what’s returned). Get rid of the ().

local bindable = Instance.new("BindableFunction")

local function test(...)
	print(...)
	return "Passed"
end

bindable.OnInvoke = test
print(bindable:Invoke("Testing", "the", "function")) -- Testing the function, passed

You’re calling the function instead of binding it, remove the brackets.

There’s also a remote function tutorial available on the old Wiki here

4 Likes

sorry all for not marking solution I went to the gym, so didn’t check… you know can’t skip leg day

1 Like