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: Regen Button

Previous Thread :: Next Thread 
Tigeon is not online. Tigeon
Joined: 24 May 2013
Total Posts: 4222
09 Jan 2016 09:57 PM
I have a model, with my boat, and the regen in it. I just need the script for it to regen. Can you make it remove the old one but only work if nobody is sitting in the drivers seat of the old one?
Report Abuse
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
09 Jan 2016 10:12 PM
Put this in the button, and when stepped on the button will regen the model.

script.Parent.Touched:connect(function() --Regen model
for i,v in pairs(game.Workspace:GetChildren()) do --Get model's parts
if v.ClassName == ("Part" or "Model") then --Ensure the parts are for the right model
v:Destroy() --Cleans up the model and automatically replaces it
end
end
end)
Report Abuse
Tigeon is not online. Tigeon
Joined: 24 May 2013
Total Posts: 4222
09 Jan 2016 10:20 PM
b
Report Abuse
Tigeon is not online. Tigeon
Joined: 24 May 2013
Total Posts: 4222
09 Jan 2016 10:43 PM
that deletes the baseplate LOL
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
09 Jan 2016 11:14 PM
That was a test to see if you had ANY scripting knowledge AT ALL. Even I saw from a mile away that it would just delete everything.


sweg
Report Abuse
iEzei is not online. iEzei
Joined: 13 Oct 2012
Total Posts: 135
09 Jan 2016 11:39 PM
It's funny that he fell for it.
Amazing, the people that come here.



#code iEzei.Purpose = "Scripting"
Report Abuse
Tigeon is not online. Tigeon
Joined: 24 May 2013
Total Posts: 4222
09 Jan 2016 11:41 PM
Honestly I saw that coming when it looked for workspaces childs things.
Report Abuse
bowlsroblox is not online. bowlsroblox
Joined: 03 Dec 2013
Total Posts: 133
09 Jan 2016 11:44 PM
script.Parent.Touched:connect(function()

if script.Parent:IsA("Model") or script.Parent:IsA("Part") then
if game.Workspace.Boat:IsA("Model") then
find = game.Workspace.Boat:children()
find:Destroy()
wait(2)
find:clone()

end)

Hope it works


Bowlsroblox_Scripter
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