|
| 02 Oct 2011 06:08 PM |
function onClicked() game.Workspace.Water.Transparency = 0 wait(5) game.Workspace.Water.Transparency = 1 end Script.Parent.Clicked:connect(onClicked)
Output: Bad argument on line 6 (a nil value) |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Oct 2011 06:13 PM |
script.Parent.ClickDetector.Clicked:connect(onClicked)
I think try this |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Oct 2011 06:16 PM |
Nvm this works.
function onClicked() game.Workspace.Water.Transparency = 0 wait(5) game.Workspace.Water.Transparency = 1 end script.Parent:findFirstChild("ClickDetector").MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2011 06:18 PM |
Oh I see its actually this
script.Parent.ClickDetector.MouseClick:connect(onClicked)
you can look up more about this here
http://wiki.roblox.com/index.php/Making_an_onClicked_script |
|
|
| Report Abuse |
|
|
| |
|