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: Cant seem to find out how to do this...

Previous Thread :: Next Thread 
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 10:19 AM
I want this script here to be able to delete hats and tools only, but no human body parts or other parts. Can someone help me please?

bin = script.Parent

function onTouched(part)
part.BrickColor = BrickColor.new(26)
wait(.3)
part.Transparency = .2
wait(.1)
part.Transparency = .4
wait(.1)
part.Transparency = .6
wait(.1)
part.Transparency = .8
wait(.1)
part.Parent = nil
end

connection = bin.Touched:connect(onTouched)

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 10:42 AM
Anyone?

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
18 Nov 2012 10:52 AM
bin = script.Parent

bin.Touched:connect(function(part)
if part.Parent:IsA("Tool") or part.Parent:IsA("Hat") then
part.BrickColor = BrickColor.new(26)
wait(.3)
for i = 0,.9,.05
part.Transparency = i
wait()
end
part:Destroy()
end
end)

Try this.
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 03:24 PM
Thanks ill test it right away!

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 03:27 PM
Didnt work :/ Anyone else think they can take a go at making it so only gear and hats dissapeer, but the body doesnt?

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
18 Nov 2012 03:29 PM
What are you trying to make? When a gear/hat has been dropped or when they touch it, the gear and hat is removed?
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 03:32 PM
Yes, exactly what i want. But when a humanoid touches it, nothing happens

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 03:34 PM
I know it is possible, but i cant seem to figure out how to do it correctly

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
rogeke15 is not online. rogeke15
Joined: 22 Jun 2010
Total Posts: 6090
18 Nov 2012 04:10 PM
SO HARD SOMEONE HELP D:

~I don't always fight, but when I do, I use a rubber chicken~
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
18 Nov 2012 05:02 PM
So you want them removed whenever someone touches it?

Just making sure.

Im about to make it for you :)
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
18 Nov 2012 05:14 PM
Put this in the StarterGui

if script.Parent.Name == "PlayerGui" then
script.Parent = script.Parent.Parent.Character
end
function onTouch(Hit)
if Hit.Parent.ClassName == "Hat" or Hit.Parent.ClassName == "Tool" then
Hit.Parent:Destroy()
end end
script.Parent["Head"].Touched:connect(onTouch)
script.Parent["Torso"].Touched:connect(onTouch)
script.Parent["Right Arm"].Touched:connect(onTouch)
script.Parent["Left Arm"].Touched:connect(onTouch)
script.Parent["Right Leg"].Touched:connect(onTouch)
script.Parent["Left Leg"].Touched:connect(onTouch)
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