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

Getting error "attempt to index function with 'InvokeServer'"?[SOLVED]

This function here is supposed to invoke a remote function, but it gives the error as seen in the title. I don't have any idea why, so I'm just going to write down the server and client scripts.

-- local script
local bodytype = nil
function checkbodytype()
	bodytype = checkbodytype:InvokeServer(tool)
end
-- server script
repstorage.RemotesUMP.CheckBodyType.OnServerInvoke = checkbodytype

1 comment

0

You can't call the function "checkbodytype" inside the function "checkbodytype"

1 answer

Nevermind, the RemoteFunction's name was the same as the function's name, and it was trying to :InvokeServer on the function.

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