local modulescript = require(game.ServerScriptService.CONFIG.Music)
print(modulescript.mID)
function isAuthenticated(player) -- checks to see if the player owns your pass
return game:GetService("GamePassService"):PlayerHasPass(player, modulescript.mID)
end
script.Parent.MouseButton1Click:connect(function(plr)
if isAuthenticated(plr) then
print(plr.Name .. " has bought the game pass with id " .. modulescript.mID)
else
print("gamepass not owned!")
end
end)
Gamepass is stored in the module script, nothing wrong with that it's just that I get an error saying, "Not a valid Player"
How can I solve it?
|