1 | local id = 8168744 |
2 |
3 | game:GetService( "MarketplaceService" )PromptGamePassPurchaseFinished:Connect( function (plr,ido,purchased) |
4 | if purchased and id = ido then |
5 | game.ServerStorage.catint.Value = true |
6 | end |
7 | end ) |
im trying to set a value to true when the pass is purchased but it wont work
Try to use this script
01 | local MarketPlaceService = game:GetService( "MarketPlaceService" ) |
02 | local id = 8168744 |
03 |
04 | MarketPlaceService.PromptGamePassPurchaseFinished:Connect( function (plr, purchasePassID, purchaseSuccess) |
05 | if purchaseSuccess = = true and purchasePassID = = id then |
06 | -- I would recommend to put catint is Replicated Storage |
07 | local RS = game:GetService( "ReplicatedStorage" ) |
08 | RS:WaitForChild( "catint" ).Value = true |
09 | end |
10 | end ) |
If it doesn't work, tell me the output error. I will put an updated code.
BoolValues can and a "True" or "False" value. and if you want to change it you would do
"Name of Bool" = True or
"Name of Bool" = False
in your case "Name of Bool" is Value.