|
| 27 Mar 2013 06:38 PM |
| Im am trying to make this brick when you touch it, it will remove connections like a weld or studs in inlets. These are found in front of trains in those train vs cars games. I tried to write the script but it couldn't work. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2013 06:42 PM |
wasn't sure what you were talking about but here's a guess function remove() brick.TopSurface = "Smooth" brick.BottomSurface = "Smooth" brick.RightSurface = "Smooth" brick.LeftSurface = "Smooth" brick.FrontSurface = "Smooth" brick.BackSurface = "Smooth" end remove() |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2013 06:45 PM |
| Thanks, that was close to some thing im looking for. I was expecting something like: brick:Destroy(). I tried to put in the argument for the brick to touch the other ones in order to execute the function "Destroy". I'm new to scripting and the wiki wasn't easy enough. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:06 AM |
| Well I tested it and it didn't work, please somebody help me. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:21 AM |
function Remove() script.Parent:BreakJoints() end Remove() |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 10:35 AM |
| I mean like the brick has a script and whatver it touches (exept for the other brick connected to it) will break, not when the brick gets touch, it gets sperated from the other parts of the model. Like what I said earlier, check those roblox derby or train vs cars games becase they had those kinds of bricks in the front. |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Mar 2013 10:08 AM |
function remove() brick.TopSurface = "Smooth" brick.BottomSurface = "Smooth" brick.RightSurface = "Smooth" brick.LeftSurface = "Smooth" brick.FrontSurface = "Smooth" brick.BackSurface = "Smooth" end
script.Parent.Touched:connect(remove)
Just put this in a script in the brick. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2013 10:11 AM |
function remove(brick) brick.TopSurface = "Smooth" brick.BottomSurface = "Smooth" brick.RightSurface = "Smooth" brick.LeftSurface = "Smooth" brick.FrontSurface = "Smooth" brick.BackSurface = "Smooth" end
script.Parent.Touched:connect(remove)
Sorry, I forgot a part, use this one instead. |
|
|
| Report Abuse |
|
|
badcc
|
  |
| Joined: 18 Jan 2009 |
| Total Posts: 3170 |
|
|
| 31 Mar 2013 10:14 AM |
What Luke said is what you are looking for.
You need to use :BreakJoints() |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2013 10:16 AM |
If you want exact script with break joints it would go something like this:
function onTouched(hit) hit:BreakJoints() end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2013 10:26 AM |
| CodeCreator1's script above is the one i'm looking for. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2013 10:38 AM |
| Well, I doesnt work anymore, I tried once it did and it stopped working. |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2013 06:12 PM |
| On line 1, the output window showed nothing and later said Script Disconnected. Someone please help me! |
|
|
| Report Abuse |
|
|
| |
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 02 Apr 2013 06:28 PM |
brick = script.Parent function Done() brick.TopSurface = "Smooth" brick.BottomSurface = "Smooth" brick.RightSurface = "Smooth" brick.LeftSurface = "Smooth" brick.FrontSurface = "Smooth" brick.BackSurface = "Smooth" end script.Parent.Touched:connect(Done)
script goes inside the brick |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2013 03:46 PM |
| What are you doing? That would make it so that when touched the brick that is touched turns smooth. He wants it so the one that touched the brick turns smooth. |
|
|
| Report Abuse |
|
|
darkggod
|
  |
| Joined: 04 Feb 2011 |
| Total Posts: 8316 |
|
|
| 03 Apr 2013 04:13 PM |
Or you can just insert a block mesh into it and remove it after? e.e? Like so.
--Made By Darkggod
delay = 10 --Defult time, Change it to the time you want to run after this time it will remove the blockmesh and make the part/brick normal again.
script.Parent.Touched:connect(function() sp = script.Parent
g = Instance.new("BlockMesh", sp)
wait(delay)
g:Remove() -- Remove This line if you never want it to become normal again. end)
~LS Emperor Darkggod~ |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2013 06:52 PM |
| I dont understand. I placed the script in the brick, it worked once then it fail for the rest of the time. |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Apr 2013 08:10 PM |
local part = Workspace["YourPart'sNameHere"] function removeallsurfaces() part.TopSurface = 0 part.BottomSurface = 0 part.FrontSurface = 0 part.BackSurface = 0 part.LeftSurface = 0 part.RightSurface 0 end
function hit(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then removeallsurfaces() end end part.Touched:connect(hit)
|
|
|
| Report Abuse |
|
|