As previously shown on this forum site before, there were seat scripts restricted to singular teams, but I want help on making it to multiple teams. If you can help me, I'd appreciate it. I got a script to start off of provided from VeryRaven from a similar forum page.
(https://scriptinghelpers.org/questions/46281/how-do-i-make-a-team-only-vehicle-seat-script)
script.Parent.Touched:connect(function(hit) -- Fires when seat is touched
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- locates the player
local cops = game.Teams:WaitForChild("Cops") -- change "Cops" to the team name
if hit.Parent:FindFirstChild("Humanoid") and player.Team ~= cops then -- checks if player isn't in team
wait(0.05)
hit.Parent.Humanoid.Sit= false -- kicks player off of seat
end
end)
Thank you.

2 comments
Try doing local cops = game.Teams:WaitForChild("Cops") and ("Criminals") instead of ("Criminals") put your team name.
Thanks for the response but it didn't work.