Police Vehicles and ELS issue

Yeah so I’ve been making these police vehicles, with the help of text buttons appearing on screen for the user driving to turn on the ELS, my issue is that I need to make vehicles individualized so that the person driving only can control the ELS in HIS car and not in all of the other vehicles. Is this a simple thing to set up?

I’d advise you to have scripts individualized to the vehicles, rather than being a universal script to control it. So you could insert a script into a vehicle model and have it reference script.Parent, etc. and have the GUI be inserted from that script to control that vehicle specifically. To reference the vehicle from the GUI, you could assign each model a number and have an IntValue or something similar in the GUI changed by the vehicle’s scripts so it knows which vehicle to reference.

So like
if value.? = true
then

No, give each player an IntValue for the car they’re driving and make the script for each vehicle generate a random number that’s unique and set the player’s IntValue to that if they’re driving.

1 Like