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: Script Reacting to Script

Previous Thread :: Next Thread 
newholland1 is not online. newholland1
Joined: 29 May 2011
Total Posts: 68
25 Aug 2013 05:46 PM
Hello, this script will help me with my game.

I have always wanted to learn scripting and I just know very little about it and trying to learn.

I want someone to tell me, make one, or help me out making a script that will make the part that the script is in disappear when it is touched by a part that has a certain script in it.

That way it will only reacts to a certain part, not any kind of part.

Thanks for any help, it is appreciated. Newholland1
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
25 Aug 2013 06:07 PM
try this
while true do
BRICKNAME.touch.CanCollide = false
BRICKNAME.Transparency = 1
wait(1)
BRICKNAME.touch.CanCollide = true
BRICKNAME.Transparency = 0
end
Report Abuse
Friaza is online. Friaza
Joined: 26 Dec 2008
Total Posts: 6229
25 Aug 2013 06:10 PM
function DeleteOtherPart(Part)
if Part:FindFirstChild("ACertainScript") then
script.Parent:remove()
end
end
script.Parent.Touched:connect(DeleteOtherPart)
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
25 Aug 2013 06:11 PM
:Remove() is deprecated. Use :Destroy() instead.
Report Abuse
Friaza is online. Friaza
Joined: 26 Dec 2008
Total Posts: 6229
25 Aug 2013 06:12 PM
Yolo
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
25 Aug 2013 06:12 PM
ogm get out
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
25 Aug 2013 06:17 PM
Ye Friaza you suck at scripting soo hard ya frub (#swegfest2011)

xD
Report Abuse
Iterations is not online. Iterations
Joined: 22 Jul 2013
Total Posts: 751
25 Aug 2013 06:18 PM
says the one with a bronze scroll
you know what that reminds me of
a penny
pennies are useless
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
25 Aug 2013 06:19 PM
I said 'get out' because he said 'Yolo.'

I hate yolo.
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
25 Aug 2013 06:21 PM
Who cares, remove() works too, in this case.
Report Abuse
Iterations is not online. Iterations
Joined: 22 Jul 2013
Total Posts: 751
25 Aug 2013 06:22 PM
hashteg sweg
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
25 Aug 2013 06:23 PM
@shon, it may still work but it is bad practice to use it because it is deprecated.
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
25 Aug 2013 06:24 PM
I never said it was good. Now did I? :P
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
25 Aug 2013 06:27 PM
You said "who cares", implying that is doesn't matter.
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
25 Aug 2013 06:28 PM
Correct, I never said it was good nor bad.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
25 Aug 2013 06:33 PM
Iterations I got bronze because I dind't bring a laptop, now if you think about it that way, you can be a bit more swegilishous
Report Abuse
newholland1 is not online. newholland1
Joined: 29 May 2011
Total Posts: 68
25 Aug 2013 06:44 PM
That looks like it would react to any brick not a certain one. Or am I wrong? I'm just learning that's why I'm asking.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
26 Aug 2013 05:38 AM
Just use this for gosh golly sake...

function t(tt)
if tt.Parent:FindFirstChild("Humanoid") then
script.Parent:Destroy()
end
end

script.Parent.Touched:connect(t)
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
26 Aug 2013 05:41 AM
Think of it as a gun:

function t(tt) -- The gun it's self
if tt.Parent:FindFirstChild("Humanoid") then -- This just makes sure that the thing that it is touching is human.
script.Parent:Destroy() -- Destroys it, and this is the firing of the bullet
end -- Ending the if statement
end -- Ending the function

script.Parent.Touched:connect(t) -- The trigger, whenever the brick is touched you click the trigger, firing the gun.


I hope that helped?
Report Abuse
newholland1 is not online. newholland1
Joined: 29 May 2011
Total Posts: 68
26 Aug 2013 04:19 PM
I worked with it and it worked. But I tried putting a Humanoid into a brick and it wouldn't let me.

How do I change it so it works on a new Part and it is named, idk, Corn.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
26 Aug 2013 04:25 PM
Use this:

script.Parent.Touched:connect(function(Hit)
if Hit.Name == "Put the name of the brick that you want to delete this brick in here" then
script.Parent:Destroy
end
end)
Report Abuse
Friaza is online. Friaza
Joined: 26 Dec 2008
Total Posts: 6229
27 Aug 2013 10:49 AM
@Zach, I hate your type a lot. You own scripting groups yet can't even finish a game. This thread is for helping people, not for elitist brats to spew their superiority around with no credibility.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
28 Aug 2013 07:56 AM
I have finished many games; my former account has over 4,000,000 visits. I made a new one because I felt I was categorized with the game developers that have tons of visits and think they're better than everyone. I have tons of credibility, if you would like me to showcase it, I can.
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