generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why doesn't this work?

Previous Thread :: Next Thread 
Lonewarrior07 is not online. Lonewarrior07
Joined: 12 Jun 2011
Total Posts: 646
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
Lonewarrior07 is not online. Lonewarrior07
Joined: 12 Jun 2011
Total Posts: 646
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 is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
20 Apr 2013 12:25 PM
[ Content Deleted ]
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
20 Apr 2013 12:25 PM
Vector3.new(0,0,0)
Report Abuse
Lonewarrior07 is not online. Lonewarrior07
Joined: 12 Jun 2011
Total Posts: 646
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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
Lonewarrior07 is not online. Lonewarrior07
Joined: 12 Jun 2011
Total Posts: 646
20 Apr 2013 12:50 PM
Clicked is not a valid member of clickdetector
Report Abuse
ball360 is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
20 Apr 2013 12:51 PM
Oh...Oops D:
Report Abuse
Lonewarrior07 is not online. Lonewarrior07
Joined: 12 Jun 2011
Total Posts: 646
20 Apr 2013 12:55 PM
thank you working now
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image