So right now I have a local script in the PlayerScripts that says this:
1 | local p = game.Players.LocalPlayer |
2 |
3 | p.CharacterAdded:Connect( function (c) |
4 | if game:GetService( "MarketplaceService" ):UserOwnsGamePassAsync(p, 2380022448 ) = = true then |
5 | --item.Parent = player backpack |
6 | end |
7 | end ) |
Is it correct? I'm new to the UserOwnsGamePassAsnyc bit.
You could also make this in a regular script, placed in the ServerScriptService.
1 | game.Players.PlayerAdded:Connect( function (p) |
2 | p.CharacterAdded:Connect( function () |
3 | if game:GetService( "MarketPlaceService" ):OwnsGamePassAsync(p, 2380022448 ) then |
4 | item.Parent = p.Backpack |
5 | end |
6 | end ) |
7 | end ) |