I am currently learning how to make a gamepass script using Peasfactory's tutorials. Below is the script I am having trouble with.

local MarketPlaceService = game:GetService("MarketplaceService") local GamePassId = 4919592

game.Workspace.vipdoor.Touched:Connect(function(player) local user = game.Players:GetPlayerFromCharacter(player.Parent) local Points = user.leaderstats.Points if MarketPlaceService:UserOwnsGamePassAsync(user.UserId, GamePassId) then Points.Value = Points.Value + 10 end end)

This is what the game outputs.

16:30:34.362 - Workspace.GamePass:6: attempt to index local 'user' (a nil value) 16:30:34.362 - Stack Begin 16:30:34.362 - Script 'Workspace.GamePass', Line 6 16:30:34.363 - Stack End

Any feedback would be greatly appreciated. Thank you for taking the time to help answer my question? I hope to hear from you soon.

1 comment

0

Since this is not your script, we can't help.