|
| 10 Aug 2012 01:16 AM |
i want it so that if a brick named "Part" hits this brick, the "Part" brick is removed
function onHit(hit) if hit.Parent.Name == "Part" then hit.Parent:Remove() end
game.Workspace.Remover.hit:connect(onHit)
i cant find a problem... |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 01:24 AM |
Two problems. You're missing an end, and the event is called Touched, not hit.
function onHit(hit) if hit.Parent.Name == "Part" then hit.Parent:Remove() end end game.Workspace.Remover.Touched:connect(onHit)
http://wiki.roblox.com/index.php/User:ElectricBlaze |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 01:28 AM |
| oh, but even with the fixes it doesnt work |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:17 AM |
| You capitalized Remove. It's lower case. |
|
|
| Report Abuse |
|
|
PETYO39
|
  |
| Joined: 17 May 2008 |
| Total Posts: 4950 |
|
|
| 10 Aug 2012 02:22 AM |
@stickypigeon
wrong, that doesn't matter what so ever. It can be part:Remove() or part:remove() |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:35 AM |
| Remove was replaced by Destroy a long time ago... |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:41 AM |
| :O your petyo 39 i watch your tutorials. Their pretty good. And ooh sorry then. I just never capitalize remove when i use it. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:44 AM |
and try this in your remover
brick = script.Parent
function onHit(hit) if hit.Parent.ClassName == "Part" then hit.Parent:remove() end end brick.Touched:connect(onHit) |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:54 AM |
| i already got it, i looked at some free model remover to find out what i was doing different and got it, but thanks for the help everyone |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:49 AM |
the roblox output always tells you why the script doesnt work if your on roblox studio. just click view and then output |
|
|
| Report Abuse |
|
|
Gyration
|
  |
| Joined: 06 Aug 2012 |
| Total Posts: 9 |
|
|
| 10 Aug 2012 04:52 AM |
> romaster512
They never replaced Remove, as Remove is still available to be used. They added Destroy, though, so Remove can slowly become less used, so when they do remove it, it'd affect less people. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 05:01 AM |
You guys have it all wrong. Remove and Destroy are two totally different things.
Remove will parent an object to nil and call Remove on all of its children.
Destroy will parent an object to nil, call Destroy on all of its children, remove all variable assignments to the object, and then GC. |
|
|
| Report Abuse |
|
|