local passId = 379480149 function isAuthenticated(player) return game:GetService("GamePassService"):PlayerHasPass(player, passId) end script.Parent.VehicleSeat.ChildAdded:connect(function(obj) if game.Players:FindFirstChild(obj.Part1.Name) then plr = game.Players:FindFirstChild(obj.Part1.Name) end if plr and not isAuthenticated(plr) then plr.Character.Humanoid.Jump = true print(plr.Name.." is not authorized to use this vehicle") end end)
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 to find the problem, but couldn't find it. Although "plr" on line 9 is underlined in blue. Can anyone help?