Hello, I have a script that works when the car is running and not regened, but it doesn't work when the car regenerates. Can somebody help me figure this out?
1 | local ambulance = game.Workspace:WaitForChild( "Ambulance" ) |
2 | local shell = ambulance.Shell |
3 | local siren = shell [ "Ambulance Siren" ] |
4 | script.Parent.ClickDetector.MouseClick:connect( function (player) |
5 | siren:Stop() |
6 | end ) |
You probably haven't made a script to put the script back into the car after regen
put your script:
1 | script.Parent.ClickDetector.MouseClick:connect( function (player) |
2 | local ambulance = game.Workspace:WaitForChild( "Ambulance" ) |
3 | workspace.Ambulance.Shell [ "Ambulance Siren" ] :Stop() |
4 | end ) |
into the model that it regenerates from