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 » Scripters
Home Search
 

Re: OnTouch Help

Previous Thread :: Next Thread 
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 06:37 AM
I want my brick to inject this script into any brick it touches

bin = script.Parent

function onTouched(part)
part.BrickColor = BrickColor.new(104)
part.Material = "CorrodedMetal"
part.Transparency = 0
part.FormFactor = "Symmetric"



end

connection = bin.Touched:connect(onTouched)
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 06:51 AM
bump
Report Abuse
Mkhero4433 is not online. Mkhero4433
Joined: 28 Aug 2010
Total Posts: 227
07 Feb 2015 07:01 AM
Do you want to Duplicate or keep the same solo script.
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 07:14 AM
Duplicate
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 07:23 AM
bump
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
07 Feb 2015 07:27 AM
script:Clone().Parent = hit
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 07:35 AM
It didnt work :c
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
07 Feb 2015 07:41 AM
BUMP :/
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
07 Feb 2015 07:47 AM
So you want it to change the properties of any part it touches, or change the properties and add that script to it, so it will spread it?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
07 Feb 2015 08:10 AM
because i am nice

script.Name = "Infect"
script.Parent.Touched:connect(function(part)
if not part:FindFirstChild("Infect") then
part.BrickColor = BrickColor.new(104)
part.Material = "CorrodedMetal"
part.Transparency = 0
part.FormFactor = "Symmetric"
script:clone().Parent = part
end
end)

use that if you want everything but the starter part to be affected

use this if you want everything including the starter part to be infected:

local obj = script.Parent
script.Name = "Infect"
obj.BrickColor = BrickColor.new(104)
obj.Material = "CorrodedMetal"
obj.Transparency = 0
obj.FormFactor = "Symmetric"
script.Parent.Touched:connect(function(part)
if not part:FindFirstChild("Infect") then
script:clone().Parent = part
end
end)
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 05:05 AM
Thanks :)
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 05:24 AM
wait I cant add a breakjoints script into the script

The script makes it purple n all but how do I make the script also break joints?

(im a noob scripter :3)
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 05:33 AM
break joints?

do you mean you want to kill people or break apart models?
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 05:39 AM
Break apart models. I made scripts like that but it wont work on yo script..
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 05:52 AM
lol

pm me telling me everything you want the script to do

i can probably make it all happen in one script
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 05:54 AM
So how do I make it breakjoints?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 05:57 AM
which version of my script did you use, the first or the second one?
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 05:59 AM
le 1st
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 06:02 AM
this is a good question actually

whenever a part in a model gets touched, do you want the entire model to be infected or just the part touched?
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 06:02 AM
Just the paarttt
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 06:11 AM
if the virus hits a part in a model, this will break all the joints in the model:

script.Name = "Infect"
script.Parent.Touched:connect(function(part)
if not part:FindFirstChild("Infect") then
if part.Parent:IsA("Model") then
part.Parent:BreakJoints()
end
part.BrickColor = BrickColor.new(104)
part.Material = "CorrodedMetal"
part.Transparency = 0
part.FormFactor = "Symmetric"
script:clone().Parent = part
end
end)

in opposition, this will only break all the joints in the part that is touched:

script.Name = "Infect"
script.Parent.Touched:connect(function(part)
if not part:FindFirstChild("Infect") then
part.Parent:BreakJoints()
part.BrickColor = BrickColor.new(104)
part.Material = "CorrodedMetal"
part.Transparency = 0
part.FormFactor = "Symmetric"
script:clone().Parent = part
end
end)
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
08 Feb 2015 06:11 AM
oops if you want the second script i wrote it wrong

here is the second one fixed:

script.Name = "Infect"
script.Parent.Touched:connect(function(part)
if not part:FindFirstChild("Infect") then
part:BreakJoints()
part.BrickColor = BrickColor.new(104)
part.Material = "CorrodedMetal"
part.Transparency = 0
part.FormFactor = "Symmetric"
script:clone().Parent = part
end
end)
Report Abuse
EPIKGAMERMAN is not online. EPIKGAMERMAN
Joined: 12 Dec 2012
Total Posts: 8781
08 Feb 2015 06:12 AM
k thx. I put the part that you made in my models. You can use it if you want :3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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