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

(edited) passed value is not a function???

okay, I have had this error before but I CANNOT seem to fix it. it seems to end the function perfectly.
if anyone can get out their brains and tell me what this error means so I can fix it myself, I would be set to make my program work. thanks!

EDIT: this a long script and I won't provide context, but I can give the error message and when it occurs. Error: 17:00:12.316 - Attempt to connect failed: Passed value is not a function 17:00:12.318 - Stack Begin 17:00:12.319 - Script 'Plugin_-1.virafinder.Script', Line 273 - function startgui 17:00:12.320 - Stack End
occurs when trying to call with connecting: dockWidget.menu.Fscan.MouseButton1Click:Connect(scan("F"))

1 comment

0

Please provide some code or context, otherwise we can't help.

2 answers

It means it needs a passed value that is a function and not any other datatype. Most likely the result of trying to set up a connection but you pass something or nil rather than a function inside of it.

I can recreate the error like this

game.Players.PlayerAdded:Connect(Added) --//It doesn't know what "Added" is, so it returns nil instead of the function

function Added(Player)
	print(Player.Name .. " Joined!")
end

--//Output: Attempt to connect failed: Passed value is not a function

That's all I can come up with without you providing any code.

code must be this because you cant connect a function with an input without doing this:

dockWidget.menu.Fscan.MouseButton1Click:Connect(function()
			scan("F")
		end)

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