|
| 28 Jul 2012 02:28 AM |
| Since no one's helping me in that thread, I will link it: http://www.roblox.com/Forum/ShowPost.aspx?PostID=73806047 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
ScarXD
|
  |
| Joined: 03 Dec 2010 |
| Total Posts: 10323 |
|
|
| 28 Jul 2012 02:32 AM |
People helped, you just don't understand scripting.
Guardian Units of Nations,Leader~Scar~ |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 28 Jul 2012 02:36 AM |
local button=Instance.new("Part",workspace) button.Name = "Button" local clickd=Instance.new("ClickDetector",button) local model = nil local m=Instance.new("Model",workspace) wait(0.1)
clickd.MouseClick:connect(function() if model then model:Destroy() else local model=Instance.new("Model",workspace) end end)
Dunno if this works... But you should try learning Lua. I quit along time ago... Again, I don't know if this works. I just wrote it. |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2012 02:37 AM |
Yes they did helped, I even tried to fix it, nothing happened. It was supposed to add and remove but it only adds. |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 28 Jul 2012 02:37 AM |
local button=Instance.new("Part",workspace) button.Name = "Button" local clickd=Instance.new("ClickDetector",button) local model = nil local m=Instance.new("Model",workspace) wait(0.1)
clickd.MouseClick:connect(function() if model then model:Destroy() else local mm=Instance.new("Model",workspace) local model = mm end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Jul 2012 02:44 AM |
Well this one worked but..
local B = workspace.Button --Button local M = workspace.Model --Model :D M2 = workspace.Model:Clone() Debounce = 1
B.ClickDetector.MouseClick:connect(function() if Debounce == 1 then Debounce = 0 M:Destroy() end if Debounce == 0 then Debounce = 1 M3 = M2:Clone() M3.Parent = game.Workspace end end)
It doesn't remove the model upon clicking the button. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 28 Jul 2012 02:57 AM |
@Juicy: Not sure if trolling.. BUMP+HELP! |
|
|
| Report Abuse |
|
|
| |
|
ScarXD
|
  |
| Joined: 03 Dec 2010 |
| Total Posts: 10323 |
|
|
| 28 Jul 2012 03:09 AM |
Go to script helpers, ask how to script, get a reply to the Wiki. There you go.
Guardian Units of Nations,Leader~Scar~ |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2012 03:12 AM |
I KNOW!
Eat your body and turn into an alien! |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 28 Jul 2012 03:34 AM |
local Model_Name = "Model" --Model must be in workspace. local B = workspace.Button M=workspace:FindFirstChild(Model_Name) local M2 = M:clone() B.ClickDetector.MouseClick:connect(function() if M.Parent == game.Workspace then print("Model is removing") M:Remove() else print("Model is gone") local M3 = M2 M3.Parent = workspace M = M3 end end) |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2012 04:09 AM |
| @RoAnt: Well, it generates and removes an empty model. My model's in the Lighting and one is on the workspace |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 28 Jul 2012 04:13 AM |
"My model's in the Lighting and one is on the workspace"
Please explain to me in details... I have no clue what you want me to do with the model in Lighting and workspace.
Also, this is not 'helping' anymore, it's 'making.'
P.S. I have a bad temper. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 28 Jul 2012 04:19 AM |
Alright so this is the script right? local Model_Name = "Stage1" --Model must be in workspace. local B = workspace.Button M=workspace:FindFirstChild(Model_Name) local M2 = M:clone() B.ClickDetector.MouseClick:connect(function() if M.Parent == game.Workspace then print("Model is removing") M:Remove() else print("Model is gone") local M3 = M2 M3.Parent = workspace M = M3 end end) So, it did work but the problem is- after two tries, it generates an empty model.(kinda an empty folder) I don't know but on my script, the model's copy is on the game's lighting- but it copies over and over and it doesn't get removed.
|
|
|
| Report Abuse |
|
|
|
| 28 Jul 2012 04:40 AM |
I give up. Cased closed, it's not lupus. |
|
|
| Report Abuse |
|
|