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: onClicked help

Previous Thread :: Next Thread 
h5h1hdhowes is not online. h5h1hdhowes
Joined: 31 Oct 2010
Total Posts: 1191
27 Jun 2014 03:42 PM
So I put in this code for a game:
----------------------------------------------
function onClicked()
wait(0.5)
game.Workspace.Door.Transparency = 1
game.Workspace.Door.CanCollide = false
wait(5)
game.Workspace.Door.Transparency = 0
game.Workspace.Door.CanCollide = true
end

script.Parent.Clicked:connect(onClicked)
----------------------------------------------
What its for is a door that when you click a button, the door disappears for about 5 seconds, before re-appearing. everything works, except the last line, whereas its saying that "Clicked is not a defined function of part". I just need help figuring out what to put there instead of Clicked for it to work.
Report Abuse
xXBestPieXx is not online. xXBestPieXx
Joined: 08 Nov 2012
Total Posts: 1271
27 Jun 2014 03:46 PM
Hi








A bump for you!
Report Abuse
h5h1hdhowes is not online. h5h1hdhowes
Joined: 31 Oct 2010
Total Posts: 1191
27 Jun 2014 03:54 PM
Gosh someone has to know how to do this.
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
27 Jun 2014 04:27 PM
Change Clicked to .MouseClick
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
27 Jun 2014 04:28 PM
Make script.Parent a clickdetector. You cant just click a brick.
Report Abuse
Kirbyfan56 is not online. Kirbyfan56
Joined: 29 Oct 2007
Total Posts: 179
27 Jun 2014 04:31 PM
script.Parent.ClickDetector.MouseClick:connect(onClicked) -- replace the last line with this

and put a clickdetector inside the brick
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