Juanpans
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 2680 |
|
|
| 17 Feb 2014 11:24 PM |
print 'Door script'
door=game.Workspace.Experiment1:GetChildren()
function onTouch()
door.Transparency=.1 wait() door.Transparency=.3 wait() door.Transparency=.5 wait() door.Transparency=.7 wait() door.Transparency=.9
end
Not working..
It only shows 00:20:44.209 - attempt to call a nil value In output
Help?
I Think i left something downstairs...Let me go upstairs and check |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 17 Feb 2014 11:27 PM |
| oh, and have you defined "door" |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 17 Feb 2014 11:28 PM |
nvm LOL Let me remake this:
door=game.Workspace.Experiment1:GetChildren()
function onTouch() for i = 1,#door do door[i].Transparency=.1 wait() door[i].Transparency=.3 wait() door[i].Transparency=.5 wait() door[i].Transparency=.7 wait() door[i].Transparency=.9 end door.Touched:connect(OnTouch)
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 17 Feb 2014 11:29 PM |
door=game.Workspace.Experiment1:GetChildren()
function onTouch() for i = 1,#door do door[i].Transparency=.1 wait() door[i].Transparency=.3 wait() door[i].Transparency=.5 wait() door[i].Transparency=.7 wait() door[i].Transparency=.9 end end -- forgot this end lol door.Touched:connect(onTouch) -- sry for making so many errors xd
|
|
|
| Report Abuse |
|
|
Juanpans
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 2680 |
|
|
| 17 Feb 2014 11:30 PM |
This script is supposed to get the model called 'Experiment1' in Workspace
Get the children, change the parts inside it the transparency
I Think i left something downstairs...Let me go upstairs and check |
|
|
| Report Abuse |
|
|
Juanpans
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 2680 |
|
|
| 17 Feb 2014 11:31 PM |
O ok i aint see your script
let me try it
I Think i left something downstairs...Let me go upstairs and check |
|
|
| Report Abuse |
|
|
Juanpans
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 2680 |
|
|
| 17 Feb 2014 11:57 PM |
Doesnt work ;c
I Think i left something downstairs...Let me go upstairs and check |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 12:55 AM |
door=game.Workspace.Experiment1:GetChildren()
function onTouch() for i,v in pairs(door) do if v:IsA("BasePart") then v.Transparency = .1 v.CanCollide = false reapet wait() v.Transparency = v.Transparency + .2 until v.Transparency == 0.9 if v.Transparency == 0.9 then reapet wait() v.Tranparency = v.Transparency - .2 until v.Transparency == .1 v.Transparecy = 0 v.CanCollide = true end end end
door.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 12:56 AM |
ohh, sorry.
function onTouch() for i,v in pairs(door) do if v:IsA("BasePart") then v.Transparency = .1 reapet wait() v.Transparency = v.Transparency + .2 until v.Transparency == 0.9 if v.Transparency == 0.9 then reapet wait() v.Tranparency = v.Transparency - .2 until v.Transparency == .1 v.Transparecy = 0 end end end
(onTouch)
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 02:54 AM |
*Cough* Coroutines n calling the function wrong *Cough*
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 18 Feb 2014 06:50 PM |
| therobloxian.. thats wrong... |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 18 Feb 2014 06:51 PM |
ohhhh lololololoololoolololol
door=game.Workspace.Experiment1:GetChildren()
function onTouch() for i = 1,#door do door[i].Transparency=.1 wait() door[i].Transparency=.3 wait() door[i].Transparency=.5 wait() door[i].Transparency=.7 wait() door[i].Transparency=.9 end end -- forgot this end lol door[i].Touched:connect(onTouch) -- this should work :) |
|
|
| Report Abuse |
|
|