Hello,
I have been trying to write a script for over 1 hour that only allows a special team to spawn a car, for example, the police are allowed to spawn police cars but the citizens are not.
This is what my script looks like, I only managed that everyone can spawn the car, but I didn't manage that, for example, only police officers can spawn police cars.
here my code:
script.Parent.MouseButton1Click: Connect (function (GetCar)
Mod = game.ServerStorage.VWPassat
clone = Mod: Clone ()
clone.Parent = workspace
clone: MakeJoints ()
end)
can anyone tell me how I can manage that, for example, police officers can spawn the VW Passat and all other teams cannot?
regards

1 comment
you can try to make a separate script that will only activate for the police team but not for the others