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 |
|
|
|
| 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
|
  |
| Joined: 24 May 2013 |
| Total Posts: 4222 |
|
| |
|
Tigeon
|
  |
| Joined: 24 May 2013 |
| Total Posts: 4222 |
|
|
| 09 Jan 2016 10:43 PM |
| that deletes the baseplate LOL |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|