[URGENT] Doesnt 2x on touch if gamepass owned?
Asked by
5 years ago Edited 5 years ago
So I have this script, and when you touch a part, its supposed to + 20 of the ingame currency Jump, if they have a gamepass, and if they do not have a gamepass, then it will + 10 of the ingame currency, but It doesnt work and I have no idea why, can somebody please help me. This is URGENT. Thank you merry christmas
03 | script.Parent.Touched:Connect( function (partThatTouched) |
04 | local humanoid = partThatTouched.Parent:FindFirstChildWhichIsA( "Humanoid" ) |
06 | local player = game.Players:FindFirstChild(partThatTouched.Parent.Name) |
07 | local PlrStatsJump = player.leaderstats:FindFirstChild( "Jump" ) |
10 | if game:GetService( "MarketplaceService" ):UserOwnsGamePassAsync(partThatTouched.UserId, 7549262 ) then |
11 | PlrStatsJump.Value = PlrStatsJump.Value + 20 |
15 | PlrStatsJump.Value = PlrStatsJump.Value + 10 |
Also, the output says theres something wrong on line 10, (this is a script not a local script)