****I would like to know how to make a police car that allows only that team (in this case, police) to drive it. Thanks.****
Put this in the vehicle seat
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)
This should work because I tested it! Accept my answer if it does!
Closed as Not Constructive by PyccknnXakep, Void_Frost, and Goulstem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?