Script somehow prevents me from sitting

I made this scrip that respawns a player if they aren’t on the right team, but somehow it prevents people from sitting in it no matter how much they walk over it. (It’s a vehicleseat btw). Not sure how it stops people from sitting despite not having anything to do with it

seat:GetPropertyChangedSignal("Occupant"):Connect(function(plr)

    if seat.Occupant then
        
        local occupant = seat.Occupant
        local char = occupant.Parent
        local player = game.Players:GetPlayerFromCharacter(char)
            if player.Team == game.Teams.Authorized then -- Add an "or" after each authorized team if there are multiple teams being authorized
            return
        else
            player:LoadCharacter()

        end
        end
        
end)

Is the Seat activated? :thinking: If it’s not being able to seat others, that might be why

image
I follow you for 10 mins and I’m regretting it already…


Are there any console errors? You should always provide them.

1 Like