This walkspeed gamepass is not giving the player extra speed if owned. Here's my script:
local passId = 4650300
game.Players.PlayerAdded:connect(function(player)
local function isAuthenticated(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end
print("i think it works")
if isAuthenticated(player) then
repeat wait() until player.Character.Humanoid
player.Character.Humanoid.WalkSpeed = 24---Change this line to what you want the Game Pass to do.
print("it does work!")
end
end)
It prints "i think it works" but it doesn't print ("it does work")
Also, as an extra, how could I make it so that the player can buy the gamepass in game? Thanks.

4 comments
16:33:49.595 - GamePassId '4650300' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
I replaced line 3 with return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId) and it still doesn't work
That means you have the wrong ID of the Game Pass, or you have not created the Game Pass
https://www.roblox.com/game-pass/4650300/24-Walkspeed