eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 07 Sep 2011 06:46 AM |
Example: I bougth another car while other car is still in the position i want it to be. So it stacks. I need other car to disappear while its still in the place i want it to be:
MY CURRENT SCRIPT: if (choice == script.Parent.Choice2) then if (player.leaderstats.KOs.Value >= 0) then gun = game.Lighting["Sniper"]:clone() gun.Parent = player.Backpack player.leaderstats.KOs.Value = player.leaderstats.KOs.Value - 0 script.Parent.Choice2.ResponseDialog = "Have a nice day!" else script.Parent.Choice2.ResponseDialog = "You don't have enough gold" end return end |
|
|
| Report Abuse |
|
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 07 Sep 2011 10:17 AM |
OH SHI I meant this if (choice == script.Parent.Choice3) then if player.leaderstats.KOs.Value >= 0 then model = game.Lighting["Humvee"]:clone() model.Parent = Workspace.Brick1 model:MakeJoints() player.leaderstats.KOs.Value = player.leaderstats.KOs.Value - 0 script.Parent.Choice3.ResponseDialog = "Have a nice day!" else script.Parent.Choice3.ResponseDialog = "You don't have enough gold" end return end |
|
|
| Report Abuse |
|
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
| |
|
|
| 07 Sep 2011 11:01 AM |
| No, he means how would you delete the first car when you buy another one. |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2011 11:13 AM |
| Car:remove() on the appropriate line? |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2011 11:14 AM |
if (choice == script.Parent.Choice3) then if player.leaderstats.KOs.Value >= 0 then model = game.Lighting["Humvee"]:clone() model.Parent = Workspace.Brick1 model:MakeJoints() player.leaderstats.KOs.Value = player.leaderstats.KOs.Value - 0 script.Parent.Choice3.ResponseDialog = "Have a nice day!" car:remove() else script.Parent.Choice3.ResponseDialog = "You don't have enough gold" end return end
like that? |
|
|
| Report Abuse |
|
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
|
| 08 Sep 2011 07:18 AM |
space = Workspace object = space:findFirstChild("Part") wait() :remove(..object) |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 08 Sep 2011 10:03 AM |
thisis, this will remove a random part...:
I thinking this is in a Gui, am I right?
script.Parent.MouseButton1Click:connect(function() workspace:FindFirstChild("Car's Model Name"):Remove() --code for spawning car end)
|
|
|
| Report Abuse |
|
|
| |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 08 Sep 2011 10:09 AM |
well add
workspace:FindFirstChild("Car's Model Name"):Remove() --code for spawning car
to the dialog choice script, that should remove the previous car and spawn a new one. |
|
|
| Report Abuse |
|
|
|
| 08 Sep 2011 11:23 AM |
| Capitalize Workspace, dun capitalize remove. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 08 Sep 2011 11:24 AM |
| ultra, you dony need to cap Workspace, and you dont have to have :remove() as lowercase R. |
|
|
| Report Abuse |
|
|
| |
|