|
| 03 Oct 2011 07:28 PM |
| How do you make a door (or brick) that takes your weapon or tool from you when you pass through it? |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2011 07:31 PM |
db = false door = script.Parent door.Touched:connect(function(hit) if db == false then db = true h = hit.Parent:FindFirstChild("Humanoid") p = game.Players:FindFirstChild(hit.Parent.Name) if p and h then for i,v in pairs(p.Backpack:GetChildren()) do v:Remove() wait(1) db = false end end end end)
I think this is it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Oct 2011 03:32 PM |
Though they can be broken.
Especially in places with weapons.
Any script that runs on a touch event has a tendency to have the touch sensor broken by a weapon or explosion or something of the like
I'd suggest putting a regen script in, just in case |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Dec 2011 02:06 PM |
@good you can fix that by doing
if hit then --checks if the object hit still exists -- stuffs end ~I've been to nil and back. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:09 PM |
@Mr What's it like in nil? xD
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:23 PM |
its white... VERY VERY white.
~I've been to nil and back. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:25 PM |
How did yo eat waffles? :o?
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|