of     1   

PeteHaxYou
#155868414Friday, February 13, 2015 1:42 PM GMT

I want to make it so my respawn pad doesn't make another copy of the vehicle without removing the old one. Those anyone have a script I can add that makes it so vehicles get deleted when I press a button? Please help The script I use: --Edited by Jesus-- model = script.Parent.Parent messageText = "Regenerating the Object" message = Instance.new("Hint")message.Text = messageText backup = model:clone() enabled = true function regenerate() message.Parent = game.Workspace model:clone() wait(2)--Change this number for the time in seconds it will take to regen your model. model = backup:clone() model.Parent = game.Workspace model:makeJoints() message.Parent = nil script.Disabled = true script.Parent.BrickColor = ("Black") -- Change "Black" for the exact name of the color you want, the name can be found at any brick's Properties, just click the BrickColor tab and select the one you want. wait(5)--Change this number for the time in seconds it will take between regenerations. script.Parent.BrickColor = ("Bright violet") -- Change "Bright violet" for the exact name of the color you want, the name can be found at any brick's Properties, just click the BrickColor tab and select the one you want. script.Disabled = false end script.Parent.ClickDetector.MouseClick:connect(regenerate)
PeteHaxYou
#155870110Friday, February 13, 2015 2:42 PM GMT

Please help? ;~;
PeteHaxYou
#155872299Friday, February 13, 2015 3:53 PM GMT

If you help I'll add you in my game description.
025110
#155872568Friday, February 13, 2015 4:00 PM GMT

model = script.Parent.Parent local backup = game.Lighting.Car:clone() --PUT THE MODEL IN LIGHTING NAMED "Car" local db = false script.Parent.ClickDetector.MouseClick:connect(function() if not db then db = true end local h = Instance.new("Hint").Text = "Regenerating the object.." wait(1) h:Destroy() local new = backup:Clone().Parent = workspace new:makeJoints() new.CFrame = CFrame.new(1,1,1) script.Parent.BrickColor = BrickColor.new("Lime gren") wait(2) script.Parent.BrickColor = BrickColor.new("Really Red") db = false end)
025110
#155872614Friday, February 13, 2015 4:01 PM GMT

--OOPS, DIDNT READ model = script.Parent.Parent local backup = game.Lighting.Car:clone() --PUT THE MODEL IN LIGHTING NAMED "Car" local db = false script.Parent.ClickDetector.MouseClick:connect(function() if not db then db = true end local h = Instance.new("Hint").Text = "Regenerating the object.." wait(1) h:Destroy() workspace:FindFirstChild("OldCarName"):Destroy() local new = backup:Clone().Parent = workspace new:makeJoints() new.CFrame = CFrame.new(1,1,1) script.Parent.BrickColor = BrickColor.new("Lime gren") wait(2) script.Parent.BrickColor = BrickColor.new("Really Red") db = false end)
PeteHaxYou
#155878408Friday, February 13, 2015 6:21 PM GMT

PeteHaxYou
#155879236Friday, February 13, 2015 6:43 PM GMT

nvm the script didnt work because if I placed the car into light it wouldn't be in the terrain
PeteHaxYou
#155879376Friday, February 13, 2015 6:47 PM GMT

i meant to say it doesnt work, i put a copy in lighting and it didnt work
PeteHaxYou
#155879772Friday, February 13, 2015 6:58 PM GMT

maybe it isnt connected to a click detector or something
025110
#155880589Friday, February 13, 2015 7:20 PM GMT

--I see errors, try this -- name the car "car" model = script.Parent.Parent local backup = game.Lighting.Car:clone() --PUT THE MODEL IN LIGHTING NAMED "Car" local db = false script.Parent.ClickDetector.MouseClick:connect(function() if not db then db = true end local h = Instance.new("Hint").Text = "Regenerating the object.." wait(1) h:Destroy() workspace:FindFirstChild("Car"):Destroy() local new = backup:Clone().Parent = workspace new:MakeJoints() new:MoveTo(1,1,1) script.Parent.BrickColor = BrickColor.new("Lime green") wait(2) script.Parent.BrickColor = BrickColor.new("Really Red") db = false end)
PeteHaxYou
#155881858Friday, February 13, 2015 7:53 PM GMT

local h = Instance.new("Hint").Text = "Regenerating the object.." That line had a red line under the =? Btw the script still didn't work ;~;
slxr
#155883433Friday, February 13, 2015 8:23 PM GMT

local h = Instance.new("Hint") h.Text = "Regenerating the object.." kthxbye
PeteHaxYou
#155884662Friday, February 13, 2015 8:46 PM GMT

Nope, *sigh* still didn't work :(

    of     1