Function isn't reading the arguments I'm sending it?

Hello, to explain what’s going on, I have a table that stores functions in it and the functions are supposed to carry 2 arguments which is the player and a item. But for some reason when I play the game it says that the item is nil even though I sent the item to it.

image

The item is activated with a ClickDetector so the player is automatically sent which the function reads, but it doesn’t read my ChosenItem and just returns it as nil.

Here’s how the function looks in the table.

I’m unsure why this is happening I don’t see what I’m doing wrong and the research I’ve done shows that I’m doing this right yet this argument still isn’t sending and keeps coming back nil. Any help is appreciated! :slight_smile:

MouseClick event only take one argument. U can try do this:

ClickDetector.MouseClick:Connect(function(Player)
     SelectedFunction(Player, ChosenItem)
end)

Yes this worked lol, thank you so much for the help! :slight_smile: