For some reason I can’t kick the player out of a seat if they don’t have a gamepass
I am using server script in the seat and it is not working
local MarketplaceService = game:GetService("MarketplaceService")
script.Parent:GetPropertyChangedSignal("Occupant"):Connect(function()
local Occupant = script.Parent.Occupant
if Occupant == nil then
return end
local Player = game.Players:GetPlayerFromCharacter(Occupant.Parent)
if Player then
if not (MarketplaceService:UserOwnsGamePassAsync(Player.UserId, 855140482)) then
task.wait(1)
script.Parent.Disabled = true
task.wait(3)
script.Parent.Disabled = false
end
end
end)
local MarketplaceService = game:GetService("MarketplaceService")
script.Parent:GetPropertyChangedSignal("Occupant"):Connect(function()
local Occupant = script.Parent.Occupant
if Occupant == nil then
return end
local Player = game.Players:GetPlayerFromCharacter(Occupant.Parent)
if Player then
if not (MarketplaceService:UserOwnsGamePassAsync(Player.UserId, 855140482)) then
task.wait(1)
script.Parent.Disabled = true
task.wait(3)
script.Parent.Disabled = false
end
end
end)
Ok so what I did was I made a gamepass and used that gamepass Id which didn’t work because I already had the gamepass
So my original code actually works but you can also do what @TheYusufGamer said