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
 

Why doesn't this work?

Previous Thread :: Next Thread 
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
09 Jun 2013 05:05 PM
function clicked()
if isopen == false then
isopen = true
script.Parent.Parent.MainFrame.Visible = true
elseif isopen == true then
isopen = false
script.Parent.Parent.MainFrame.Visible = false
end
end
script.Parent.MouseButton1Down:connect(clicked)



*It's in a picture, not sure if it would work for pictures.
*The parents are correct I double checked


Anyone think they know?
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
09 Jun 2013 05:06 PM
Have you defined isopen?
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
09 Jun 2013 06:10 PM
It worked without defining it in my other script but I added this to the top of the script

isopen = script.Parent.Value

(boolean)
gonna see if it works now
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
09 Jun 2013 06:14 PM
Didn't work :(
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
09 Jun 2013 06:19 PM
is this in an imagelabel?
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
09 Jun 2013 06:20 PM
You can't assign a property to a variable

function clicked()
if isopen.Value == false then
isopen.Value = true
script.Parent.Parent.MainFrame.Visible = true
elseif isopen.Value == true then
isopen.Value = false
script.Parent.Parent.MainFrame.Visible = false
end
end
script.Parent.MouseButton1Down:connect(clicked)

~ Usering ~
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
09 Jun 2013 06:33 PM
Thanks for trying, I just removed the whole thing and redid it lol.
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