generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Respawn Pad Issues, Please help?

Previous Thread :: Next Thread 
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 07:42 AM
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)
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 08:42 AM
Please help? ;~;
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 09:53 AM
If you help I'll add you in my game description.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
13 Feb 2015 10:00 AM
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)

Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
13 Feb 2015 10:01 AM
--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)
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 12:21 PM
http://www.roblox.com/Orange-County-Alpha-0-7-Snapshot-0-2-place?id=157998236 added u in my game description :)
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 12:43 PM
nvm the script didnt work because if I placed the car into light it wouldn't be in the terrain
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 12:47 PM
i meant to say it doesnt work, i put a copy in lighting and it didnt work
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 12:58 PM
maybe it isnt connected to a click detector or something
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
13 Feb 2015 01:20 PM
--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)
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 01:53 PM
local h = Instance.new("Hint").Text = "Regenerating the object.." That line had a red line under the =? Btw the script still didn't work ;~;
Report Abuse
Stormify is not online. Stormify
Joined: 27 Jan 2012
Total Posts: 378
13 Feb 2015 02:23 PM
local h = Instance.new("Hint")
h.Text = "Regenerating the object.."


kthxbye
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
13 Feb 2015 02:46 PM
Nope, *sigh* still didn't work :(
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image