Game pass script isn't working, can someone show me the correct way to do it and explain?
01 | local passId = 379480149 |
02 | function isAuthenticated(player) |
03 | return game:GetService( "GamePassService" ):PlayerHasPass(player, passId) |
05 | script.Parent.VehicleSeat.ChildAdded:connect( function (obj) |
06 | if game.Players:FindFirstChild(obj.Part 1. Name) then |
07 | plr = game.Players:FindFirstChild(obj.Part 1. Name) |
09 | if plr and not isAuthenticated(plr) then |
10 | plr.Character.Humanoid.Jump = true |
11 | print (plr.Name.. " is not authorized to use this vehicle" ) |
I put this script into the seat of the vehicle which is named Drive, and the id is correct and I'm sure of that. Though when i try to test it with someone who doesn't have the pass, they can still drive it and they don't jump out. I tried multiple ways to do it and still. I tried to find the problem, but couldn't find it. Although "plr" on line 7 is underlined in blue. Can anyone help?