|
| 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 |
|
|
| |
|
|
| 07 Feb 2015 07:01 AM |
| Do you want to Duplicate or keep the same solo script. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 07 Feb 2015 07:27 AM |
| script:Clone().Parent = hit |
|
|
| Report Abuse |
|
|
| |
|
| |
|
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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 08 Feb 2015 05:39 AM |
| Break apart models. I made scripts like that but it wont work on yo script.. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 08 Feb 2015 05:54 AM |
| So how do I make it breakjoints? |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
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 |
|
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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 |
|
|