I am so confused with this MarketplaceService Help?
I am making a speed gamepass script and found the gamepass script form roblox Developer Hub https://developer.roblox.com/en-us/articles/Game-Passes-One-Time-Purchases
so i edited it for my needs to make the speed go faster but for some reason it never notices when the players character is added.
I'll show you what I did.
01 | local MarketplaceService = game:GetService( "MarketplaceService" ) |
02 | local Players = game:GetService( "Players" ) |
04 | local SpeedPassID = 6810819 |
06 | Players.PlayerAdded:Connect( function (plr) |
08 | local hasSpeedPass = false |
11 | local success, message = pcall ( function () |
12 | hasSpeedPass = MarketplaceService:UserOwnsGamePassAsync(plr.UserId, SpeedPassID) |
17 | warn( "Error while checking if player has pass: " .. tostring (message)) |
21 | if hasSpeedPass = = true then |
22 | print (plr.Name .. " owns the game pass with ID " .. SpeedPassID) |
24 | plr.CharacterAdded:Connect( function (char) |
why is this not working and how can i fix?