|
| 05 Aug 2010 01:02 PM |
Ok, I/m trying to make a script that turns an invisble model into a visible model this is what I have so far:
deb = true script.Parent.Selected:connect(function(m) m.Button1Down:connect(function() if m.Target and m.Target.Name == "CarDoorClosed" and deb then deb = false m.Target.Transparency = 0 m.Target.CanCollide = true m.Target.Name = "CarDoorOpened" wait(1) deb = true end
if m.Target and m.Target.Name == "CarDoorOpened" and deb then deb = false m.Target.Transparency = 1 m.Target.CanCollide = true m.Target.Name = "CarDoorClosed" wait(1) deb = true end end) end)
function find(what) for _,v in pairs(what:GetChildren()) do find(v) end if what:IsA("BasePart") then what.CanCollide = true --here is where you add in what you want it to do. only add in what it is going to do, the rest of this script will take care of itself. or it should end end script.Parent.onClicked:connect(function(Click) --change the "onClicked" and/or "Click" to however you had it. find(script.Parent.Parent) --clickdetector brick's parent model end end)
Can somebody fix that so it can work? |
|
|
| Report Abuse |
|
|
piemario
|
  |
| Joined: 17 Jul 2009 |
| Total Posts: 1379 |
|
|
| 05 Aug 2010 01:04 PM |
| wow thats long and try using the output section in build mode it tells you what line ther was an error in. also yor missing a few ()'s in some places. like your functions its supposed to be (function()) not (function() |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 01:07 PM |
| Oh thanks, but I need a whole model to appear.. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 01:09 PM |
| There is something wrong with that script that needs to be fixed.. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 01:13 PM |
| Can someoe fix the problem? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
piemario
|
  |
| Joined: 17 Jul 2009 |
| Total Posts: 1379 |
|
|
| 05 Aug 2010 01:27 PM |
ill tell you what to do this might help fix it.
go in build mode. click on tools. click on view. click on output. cut and paste your script back into the same spot. it should tell you what lines of your script went wrong.
hope this helps! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 05 Aug 2010 02:49 PM |
| but what did the output tell you? |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:04 PM |
| It didn't say anything...I inserted the script and nothing happened.. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:18 PM |
| I don't know how to fix the script. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:42 PM |
| Can anyone fix the script? |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:47 PM |
script.Parent.onClicked:connect(function(Click)
lolwut? |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:49 PM |
| Thats not it... Its to advanced for andy lol...JK |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:51 PM |
| I meant what is that? I've never see a function like that. What are you trying to do there? |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 05 Aug 2010 03:52 PM |
script.Parent.onClicked
WHAT??
That doesn't even exist... |
|
|
| Report Abuse |
|
|
PureSight
|
  |
| Joined: 02 Aug 2010 |
| Total Posts: 819 |
|
|
| 05 Aug 2010 03:52 PM |
| It's a different way of stating a function, andy. I do recall someone calling it a "nested" function. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 05 Aug 2010 03:53 PM |
| Nested functions are functions inside a function, that is an anonymous function... |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 03:58 PM |
| OK andy I'm trying to make a script that turns an invisible model to visible and it has to be a hopperbin tool. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Aug 2010 04:00 PM |
| If you dont understand what this script is for, see my other thread named "Can someone help me with this?" |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2010 04:09 PM |
| Now do you get what the script is for? |
|
|
| Report Abuse |
|
|