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: Kill Bricks?

Previous Thread :: Next Thread 
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
21 Feb 2014 05:29 PM
Is there a kill brick that does not kill based on a humanoid? But rather based on something else?

If there is it would really help thanks! :D
Report Abuse
Zakkeh is not online. Zakkeh
Joined: 24 Oct 2013
Total Posts: 1133
21 Feb 2014 05:33 PM
Heh

script.Parent.Touched:connect(function(part)
if part.Parent.Humanoid then
part.Parent:BreakJoints()
end end)

lul
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
21 Feb 2014 05:36 PM
That still functions on humanoids though :O
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:37 PM
no it just sees if there IS a humanoid in the chararacter..(basically if its a player)
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:38 PM
basically so it wont rip apart your game if something touches it thats not a player
Report Abuse
Zakkeh is not online. Zakkeh
Joined: 24 Oct 2013
Total Posts: 1133
21 Feb 2014 05:39 PM
well yea.
you could do
script.Parent.Touched:connect(function(part)
if part.Parent.Torso then
if game.Players:FindFirstChild("part.Parent.Name") then
player = game.Players:FindFirstChild("part.Parent.Name")
player.Character:BreakJoints()
end end end)
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:39 PM
if you dont want humanoid to be in script at all, try this:
script.Parent.Touched:connect(function(part)
if part.Parent.Head then
Head:remove()
end end)
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:40 PM
@zakk you wouldn't need to check twice...would you?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
21 Feb 2014 05:41 PM
I have no idea what you would need one for.. just use this..

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
hit.Parent:BreakJoints()
end end)
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
21 Feb 2014 05:43 PM
The reason I need this is: I want a brick to kill a non-morphed player, but I want the players whom are morphs to not be affected.

Does this make sense?
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
21 Feb 2014 07:15 PM
B1
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
21 Feb 2014 07:33 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if hit.Parent.Torso.Shape == 0 then
hit.Parent:BreakJoints()
end end end)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
21 Feb 2014 07:34 PM
This would only work if the torso wasn't 'morphed'
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
21 Feb 2014 07:36 PM
A torso shape remains the same.

A morph is a charactermesh.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
21 Feb 2014 07:37 PM
^

He's right. Sorry
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