Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:08 AM |
| Any one know? I want it to disapear forever. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:13 AM |
put this script in the button you you want clicked and put the brick you want gone in workspace and name it XD also put a clickdetector in the brick you want clicked function onClicked() Workspace.XD:remove() end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:15 AM |
local brickToDelete = workspace.MyBrick
function onClicked() workspace.Remove(brickToDelete) end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:23 AM |
| But what if i have it in a model? |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:25 AM |
Set the path. If you don't know how, put this in your brick:
print(script.Parent:GetFullName())
Then copy what pops up and paste it where you say brickToDelete. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:25 AM |
ummm function onClicked() script.Parent.Parent:remove() end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:26 AM |
| @agent if he cant make this script he dosent know output... |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:29 AM |
| Well, i have 2 bricks in my model, Stopper and Button. I want the stopper to disapear when i click the button. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:32 AM |
put a script in bbbutton and a clickdetector in button then do this function onClicked() script.Parent.Parent.Stopper:remove() end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:51 AM |
| When i tryed to clikc the button the cursor that is suposed to come when i mouse over a clickdetector didnt come. Wierd, and of course when i cant clikc the brick nothing will happen, any advice? |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 02:54 AM |
Insert another ClickDetector in it. Cuz thats not the scripts fault click dector works with or with out a script. |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:55 AM |
| OK, and i think the clickdetector broke, becouse just when i entered my testing place and i moused over it the cursor appeared but 1 second later it was gone again... |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 02:59 AM |
| figured it out. before i sat down in the seat of the boat i could clikc it, after i had sat down i couldnt... But the script worked perfect, it removed the brick it was suposed to so i am really happy for it. But do you have any advice how to fix the problem where i cant click it after sitting down? |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Sep 2010 03:01 AM |
| well then you have a un-simple script now ummm i am no use for that |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 03:10 AM |
| I got the boat script from my friend D: Ill need to ask him what to do then |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2010 03:12 AM |
| well ummm you need like a profecinal that can change unmade properdies |
|
|
| Report Abuse |
|
|
Tonitoni
|
  |
| Joined: 14 Mar 2009 |
| Total Posts: 6429 |
|
|
| 05 Sep 2010 06:42 AM |
| I found the problem, your script worked fine but the boat script ruined it becouse it made the boat a part of the player and u cant click the player. |
|
|
| Report Abuse |
|
|
| |
|