So I made a gamepass and I want to run a remote event from the server to the client. But it doesnt run the code on the client. Any help is very appreciated!
--server
MPS.PromptGamePassPurchaseFinished:Connect(function(player, purchasepassId, purchaseSuccess)
warn("server")
if purchaseSuccess == true and purchasepassId == gamepassID then
warn("firing server")
client:FireClient(player, purchaseSuccess)
end
end)
--works fine
In the client script, when it’s called, the first argument which is passed from server to a specified client isn’t the player; so the ‘purchasesuccess’ value you attempted to pass is ‘nil’, because the player object isn’t passed from server-to-client. Hope I’ve been clear. <3
Thanks for the help! But that doesn’t seem to be the problem. For some reason the OnClientEvent function isn’t running. Would love to hear from you again!