I was working on a clicker game, and I was trying to implement a click multiplier function like most clickers have.
game:GetService("ReplicatedStorage").PlsNo.Buy.OnServerEvent:connect(function(player, item)
if item == "DPC" then
if player.leaderstats.Dogecoin.Value >= player.Assets.DPCPrice.Value then
player.leaderstats.Dogecoin.Value = player.leaderstats.Dogecoin.Value - player.Assets.DPCPrice.Value
player.Assets.DPC = player.Assets.DPC*2
player.Assets.DPCPrice.Value = player.Assets.DPCPrice.Value*2
end
end
end)
Whenever I fire this remote with the argument "DPC", it returns "DPC is not a valid member of remote event" any help would be appreciated. Thanks.
PS: It indeed says OnServerEvent:connect(function(player, item) You cannot see the "player" but if you check via source code, you will see that it is actually there. That is not the issue.

9 comments
Note that, unless you click view source, it does not show player before item. However, I can confirm it is indeed there.
lol dogeCoin
nothing seems out of place here, what about the way u fired the server?
did u accidentally add the player argument there?
There is nothing wrong with your script that I can see. How are you firing it? Eg. game.Replicated.PlsNo.Buy:FireServer('DPC') note. if your adding player when firing it. That's why its not working.
@Enomphia wrong
The reason why it isn't working is because the first parameter passed by OnServerEvent is ALWAYS the player that triggered the RemoteEvent. So what you should really be doing in those parenthesis is (player, item).
This means that "item" actually refers to the player, not "DPC". If it was the second parameter passed, then it would be "DPC".
^That is not the case. Like I said in the first comment, you may not see the player before item, but i guarantee that it indeed IS player, item