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?
local ambulance = game.Workspace:WaitForChild("Ambulance")
local shell = ambulance.Shell
local siren = shell["Ambulance Siren"]
script.Parent.ClickDetector.MouseClick:connect(function(player)
siren:Stop()
end)

7 comments
But it is supposed to be a button that you click then the siren goes off.
ah. I see.
use the script i just edited in
And I can't put the button inside the ambulance otherwise the whole game will be messed up.
use the script i just edited in as it does the script RAW meaning it doesn't take the OLD variables.
Thank you for the script, it works now.
No problem dude, the thing with regenerating items is that old variables don't get replaced so try to make scripts with regenerating properties RAW, good luck!