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 » Scripters
Home Search
 

Re: What's wrong with this...

Previous Thread :: Next Thread 
IciFlame is not online. IciFlame
Joined: 28 Sep 2013
Total Posts: 300
13 Jul 2015 06:49 PM
This is a ImageButton that is supposed to make a Frame transparent when clicked. But it does not work. This is the script:

function onClicked()
script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5
end
script.Parent:connect(onClicked)

any help?
Report Abuse
GeoVolcano is not online. GeoVolcano
Joined: 05 Jul 2012
Total Posts: 1433
13 Jul 2015 06:51 PM
script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5
end
Report Abuse
XToonLinkX123 is not online. XToonLinkX123
Joined: 24 Nov 2013
Total Posts: 74
13 Jul 2015 06:52 PM
function onClicked()
script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
13 Jul 2015 06:55 PM
MouseButton1Down is the event for clicking so your connection should be

script.Parent.MouseButton1Down:connect(onClicked)

you see

MouseButton1 is left mouse button the one ya click with

MouseButton1Down means when you click down that button it will trigger a function

That function is onClicked function

Which is

script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5
end

This is called magic.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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