Sigh, greetings once again, Scripting Helpers community. I'm trying to make a script that constantly checks if a player bought a Game Pass, and if the player does, one of their stats will be changed. But, uh, it's just not working. Sorry if I'm being a huge moron, I never worked with Game Passes and developer products before...
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
while wait() do
if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, 466868120) then
game.Players.LocalPlayer.stats.Venustoise.Value = 1
end
end
end)
end)
The error is on line 4, as the output says. 22:38:02.477 - Not a valid Player
Please give me a hand with this, I tried so many times to make this work but I just couldn't.
