generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Weapon/tool take away door

Previous Thread :: Next Thread 
crushedlove1 is not online. crushedlove1
Joined: 31 May 2008
Total Posts: 8
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
wetcooldued is not online. wetcooldued
Joined: 28 Dec 2010
Total Posts: 51
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
crushedlove1 is not online. crushedlove1
Joined: 31 May 2008
Total Posts: 8
04 Oct 2011 03:14 PM
Thanks
Report Abuse
goodnamesalltaken is not online. goodnamesalltaken
Joined: 20 Mar 2010
Total Posts: 19799
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
crushedlove1 is not online. crushedlove1
Joined: 31 May 2008
Total Posts: 8
24 Dec 2011 02:00 PM
k
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
24 Dec 2011 02:09 PM
@Mr
What's it like in nil? xD

~= Pointless siggy. Ujelly? =~
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
24 Dec 2011 02:23 PM
its white... VERY VERY white.

~I've been to nil and back.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
24 Dec 2011 02:25 PM
How did yo eat waffles? :o?

~= Pointless siggy. Ujelly? =~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image