I just added a gamepass to my game, and my script that detects whether you own it or not works fine in studio, but when I tested the game on Roblox it wouldn't work. Is this just a glitch or did I do something wrong?
local MarketPlaceService = game:GetService("MarketplaceService") function CheckforPass(userid) if MarketPlaceService:UserOwnsGamePassAsync(userid, 5377879) then return true else return false end end if CheckforPass(game.Players:GetUserIdFromNameAsync(script.Parent.Name)) == true then print(script.Parent.Name, " owns the Advanced Defuser Gamepass") script.Parent.Humanoid.WalkSpeed = 45 end