how to specify in a script that we want to talk about a specific object? see line 6 I don't know how to specify the vehicle?? I am trying to make a car gamepass that kicks you out and spawn the pass so you can buy it?
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService('Players') local id = 27137596 Seat:GetPropertyChangedSignal("Occupant"):Connect(function() if MarketPlaceService:UserOwnsGamePassAsync(id) then --whatever vehicle code/module else if Occupant:FindFirstChild('Humanoid') then -- verifies if the occupant has a humanoid(if is a player) local plr = Players:GetPlayerFromCharacter(Occupant) -- gets the player from the occupant of the seat(character) MarketplaceService:PromptGamePassPurchase(plr, id) -- prompts the gamepass claim to purchase it. Seat.Occupant = nil end end end)