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: can coilide brick not breaking joints?

Previous Thread :: Next Thread 
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 01:41 PM
it will not work is it the script's fault or can it not break joints if its not set to true for can collide?


function onTouched(hit)



hit:BreakJoints()



end







connection = script.Parent.Touched:connect(onTouched)
Report Abuse
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
05 Feb 2012 01:49 PM
function onTouched(hit)

hit:BreakJoints()
end

script.Parent.Touched:connect(onTouched)
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
05 Feb 2012 01:51 PM
you already made a thread like this a minute ago >.>


i don't believe cancollide false bricks can activate a ontouched script.
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 01:54 PM
I kinda need it to be set to false though
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
05 Feb 2012 01:58 PM
Touched still fires on CanCollide false blocks, try this -

function onTouched(hit)

if hit ~= nil then
hit:BreakJoints()
end
end


connection = script.Parent.Touched:connect(onTouched)


Make sure the script is in the block you want to be hit as well!
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
05 Feb 2012 02:00 PM
whenever i try'd to do a touched script with a cancollide false it never worked :/
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
05 Feb 2012 02:01 PM
Then you must have been doing it wrong.
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:06 PM
magnalite can you make it so that I only have to put it in the block that I want to break stuff
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
05 Feb 2012 02:07 PM
Sorry that's what i meant. It already does that.
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:09 PM
the script you gave me wont work
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Feb 2012 02:12 PM
script.Parent.Touched:connect(function(hit)
if hit ~= nil then
hit:BreakJoints()
end
end)

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Feb 2012 02:13 PM
Wait, did you want somebody to be killed?

† KMXD †
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:14 PM
nope
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
05 Feb 2012 02:16 PM
The thing running into does consist of more than one block right??
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:17 PM
nope that didn't either okay ill explain what I need it for:

I'm making a disaster type game where you have to survive raising water and it breaks everything it hits however The only way I can get it to rise is to set it to non can collide
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:20 PM
mangalite I need it to break ever part it hits
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
05 Feb 2012 02:25 PM
You want a single part to break?
If the part is a single part, then it wouldn't break because it isn't jointed with anything. --[[oi.]]--

script.Parent.Touched:connect(function(hit)
if hit.Parent then
hit.Parent:BreakJoints()
end
end)
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:27 PM
@Phellem I want it to break every part it hits
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
05 Feb 2012 02:28 PM
Since I have no idea what you're trying to do, I list the code on what I think you meant:

--Break the parent joints
script.Parent.Touched:connect(function(hit)
if hit.Parent then
hit.Parent:BreakJoints()
end
end)

--Turn the brick to CanCollide = false
script.Parent.Touched:connect(function(hit)
if hit:IsA("Part") then
hit.CanCollide = false
end
end)

--Delete the hit
script.Parent.Touched:connect(function(hit)
if hit:IsA("Part") then
hit:Destroy()
end
end)

--Explode the part
script.Parent.Touched:connect(function(hit)
if hit:IsA("Part") then
Instance.new("Explosion",workspace).Position = hit.Position
end
end)
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:30 PM
*FACEDESK* I just explained what I want it to do!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I WANT THE PART THE SCRIPT IS IN TO BREAK THE JOINTS OF ANY PART IT HITS
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
05 Feb 2012 02:32 PM
--Be patient... It was a latepost.

script.Parent.Touched:connect(function(hit)
if hit:IsA("Part") then
hit:BreakJoints()
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Feb 2012 02:32 PM
Do you know what breaking the joints do?

† KMXD †
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:36 PM
Yes I do breaking the joints causes the part to become disconnected from what it was connected to
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
05 Feb 2012 02:39 PM
When the water rise, did it killed you?
If so, the joint is broken.

script.Parent.Touched:connect(function(hit)
if hit:IsA("Part") then
hit:BreakJoints()
end
end)
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
05 Feb 2012 02:41 PM
no it did not kill me or break anything
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