Script not detecting correct team?

My script does not seem to be detecting the correct team when I sit down in my vehicle.
script:

local team = game.Teams.Drivers

script.Parent.Changed:Connect(function()
	local players = game:GetService("Players")
	local plrname = script.Parent.Occupant.Parent.Name
	local player = players:FindFirstChild(plrname)
	if player.Team == not team then
		print("NOT TEAM")
		print(player.Team)
	else
		print("ON TEAM")
		print(player.Team)
	end
end)

Video:


*please note I’m using remote events to spawn the car and change my team

I’m completely and utterly stumped, and I’m getting convinced that it’s a bug.

Your if statement is always going to evaluate to false (on team). What you should be doing is:

if player.Team ~= team then

The reason for this is because of not team. not team will always evaluate to false, unless the value of team were to be false.