|
| 20 Apr 2013 12:23 PM |
I was just testing out a sliding door and I made this script but it isn't working. I have a ClickDetector in the part that you click. I am click Part. I tried onClick and it didn't work. i am learning how to script so.
function onClicked(part) game.Workspace.Hey1.Velocity = (4,0,0) wait(6) game.Workspace.Hey1.Velocity = (0,0,0) end
script.Parent.Clicked:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2013 12:24 PM |
Just realized an error at the bottom too accidently put script.Parent
function onClicked(part) game.Workspace.Hey1.Velocity = (4,0,0) wait(6) game.Workspace.Hey1.Velocity = (0,0,0) end
game.Workspace.Hey1.Clicked:connect(onClicked) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
UnBuild
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 3233 |
|
| |
|
|
| 20 Apr 2013 12:45 PM |
New problem
function onClicked(Part) game.Workspace.Hey1.Velocity = Vector3.new(4,0,0) wait(6) game.Workspace.Hey1.Velocity = Vector3.new(0,0,0) end
script.Parent.ClickDetector:connect(onClicked)
connect is not a valid member of part someone please help? |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2013 12:46 PM |
function onClicked(Part) game.Workspace.Hey1.Velocity = Vector3.new(4,0,0) wait(6) game.Workspace.Hey1.Velocity = Vector3.new(0,0,0) end
script.Parent.ClickDetector.Clicked:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2013 12:50 PM |
| Clicked is not a valid member of clickdetector |
|
|
| Report Abuse |
|
|
ball360
|
  |
| Joined: 31 Mar 2009 |
| Total Posts: 1557 |
|
|
| 20 Apr 2013 12:51 PM |
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Shame on you, Not (Kidding) |
|
|
| Report Abuse |
|
|
| |
|
| |
|