|
| 31 Dec 2013 08:38 PM |
So on my obby i've been making there is dissapearing bricks so you have to jump quick but there's a problem.. I don't now why the script is not working.. I'm a little bit of a noob at coding by the way so don't judge
a = game.Workspace.Base function onTouch(part) a.CanCollide = false then a.transparency = 1 wait(2) a.CanCollide = true then a.transparency = 0 Wait (2) end a.Touched : connect(onTouch)
|
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 08:41 PM |
a = game.Workspace.Base function onTouch(part) if a.CanCollide == false then a.transparency = 1 a.CanCollide = true else a.transparency = 0 a.CanCollide = false end a.Touched:connect(onTouch)
that should work:P |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 08:41 PM |
a = game.Workspace.Base function onTouch(part) a.CanCollide = false a.transparency = 1 wait(2) a.CanCollide = true a.transparency = 0 wait(2) end a.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 31 Dec 2013 08:42 PM |
| Remove the 'then's and your script'll be perfect |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 08:44 PM |
transparency is not a valid member of BasePart. However, Transparency is. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 08:47 PM |
| Darn..I shouldve spotted that.. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 08:51 PM |
| and who says everyone on the forums are jerks :). Thanks guys |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:03 PM |
| but wait ... some of teh paltforms dont work and the ones that do dont turn invisble? this is the place if you wanna take a look http://www.roblox.com/The-Epic-Obby-Free-admin-at-the-end-place?id=129111569 |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:04 PM |
| wait am i not supposed to copy scripts maybe thats why? |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:11 PM |
a = script.Parent function onTouch(part) if a.CanCollide == false then a.transparency = 1 a.CanCollide = true else a.transparency = 0 a.CanCollide = false end a.Touched:connect(onTouch) Put rhe script INTO the part..instead of the workspace..soo Insert the script Into the part..and paste what I have above Like.. Insert Basic objects Script Edit it..paste the script in.. Drag the script to the part in the explorer Copy the script and put it in any other bricks u want to do the same thing with |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:15 PM |
ew so inefficient
a = game.Workspace.Base script.Parent.Touched:connect(function() if a.CanCollide and a.Transparency=0 then a.CanCollide=not a.CanCollide and a.Transparency=1 end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:17 PM |
Really?? Inefficient?? R u joking? What if there's more than one part? a = script.Parent Should be used... |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:19 PM |
sorry i wrote that in like 4 seconds
a = game.Workspace.Base a.Touched:connect(function() if a.CanCollide and a.Transparency=0 then a.CanCollide=not a.CanCollide and a.Transparency=1 end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:19 PM |
Having to define the name of every part? So inefficient |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:20 PM |
island you dont know how to script get out plz kbai |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:23 PM |
Lol what? The way u did it..he'd need sevral scripts defining each part..when he could use mind, paste it in a part, and copy the part..and every parr he copys would work..instead of using a= Workspace.partname Dostuff another script. . a = Workapace.anotherpart... That is really ineffecient.. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:25 PM |
island i found a thing that could help you
3rd grade+ a dictionary
also
a = game.Workspace.MODELHERE:GetChildren() for i=1, #a do a[i].Touched:connect(function() if a[i].CanCollide and a[i].Transparency=0 then a[i].CanCollide=not a[i].CanCollide and a[i].Transparency=1 end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:25 PM |
| Dang. .I just got ninjaed. . |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:27 PM |
And I can do grade 12 algerbra (not my h obby or anything tho..) Bt I don't need a dictionary. . P.s I'm using a phone (very small screen, very fast typer..) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:28 PM |
a = game.Workspace.MODELHERE:GetChildren() for i=1, #a do a[i].Touched:connect(function() if a[i].CanCollide and a[i].Transparency=0 then a[i].CanCollide=not a[i].CanCollide and a[i].Transparency=1 wait(1) a[i].CanCollide=not a[i].CanCollide a[i].Transparency=0 end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:51 PM |
| idk why neither of the scripts work |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 09:56 PM |
it wont let em add a touchintrest thing
|
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 10:01 PM |
Btw all teh parts are called Basse so...
|
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Dec 2013 10:47 PM |
| This is getting really annoying why wont it work |
|
|
| Report Abuse |
|
|