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.