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: Won't work

Previous Thread :: Next Thread 
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:34 PM
So I wanted to make it so when you click the Text Button it opens,then one more click it closes.That use to work but I'm trying this.It's not working


script.Parent.MouseButton1Click:connect(function()
print("Button1 click.")
script.Parent.Image = "http://www.roblox.com/asset/?id=106542518"
script.Parent.Parent.Parent.PFrame.Frame.Visible = true
if script.Parent.Parent.Parent.PFrame.Frame.Visible == false then
script.Parent.Parent.Parent.PFrame.Frame.Visible = false
script.Parent.Power:Play()
wait(5)
script.Parent.Image = "http://www.roblox.com/asset/?id=106542506"
end
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:36 PM
...It use to work but when I added the if statement is stoped
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:38 PM
Well it did'nt start.The whole script stoped working.
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:43 PM
Bump
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:49 PM
Doube Bump
Report Abuse
monstre180 is not online. monstre180
Joined: 02 May 2009
Total Posts: 110
18 Jun 2013 05:50 PM
hmm
maybe if you did this...
if script.Parent.Parent.Parent.PFrame.Frame.Visible then else

check your script.Parent.Parent.Parent thing to see if its the correct path
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:51 PM
It is the correct path and the whole script stoped working.
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 05:55 PM
TRI BUMP!
Report Abuse
marcopolo444 is not online. marcopolo444
Joined: 02 May 2010
Total Posts: 5114
18 Jun 2013 05:59 PM
Don't you need another 'end)'?
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:03 PM
Not working...
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:05 PM
...
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:06 PM
*Sigh* Bump
Report Abuse
monstre180 is not online. monstre180
Joined: 02 May 2009
Total Posts: 110
18 Jun 2013 06:07 PM
Yea i have no idea what the error could be, sorry
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:08 PM
Bump
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
18 Jun 2013 06:09 PM
You're missing an 'end' to close the if-statement.
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:11 PM
I did see.Not working


script.Parent.MouseButton1Click:connect(function()
print("Button1 click.")
script.Parent.Image = "http://www.roblox.com/asset/?id=106542518"
script.Parent.Parent.Parent.PFrame.Frame.Visible = true
if script.Parent.Parent.Parent.PFrame.Frame.Visible == false then
script.Parent.Parent.Parent.PFrame.Frame.Visible = false
end
script.Parent.Power:Play()
wait(5)
script.Parent.Image = "http://www.roblox.com/asset/?id=106542506"
end
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
18 Jun 2013 06:12 PM
Also:

"if script.Parent.Parent.Parent.PFrame.Frame.Visible == false then
script.Parent.Parent.Parent.PFrame.Frame.Visible = false
script.Parent.Power:Play()"


If the condition is true (if the script.Parent.Parent.Parent.PFrame.Frame.Visible is false) why making it false again if it's already false?
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:13 PM
lol Made a mistake in that
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
18 Jun 2013 06:14 PM
What isn't working? Please show us your output...

"Don't ask others to debug your broken code without giving a hint what sort of problem you are having. "
http://www.roblox.com/Forum/ShowPost.aspx?PostID=80625843
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:21 PM
I cant show the output because roblox keep saying there was an error was in the page
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:23 PM
...
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:26 PM
Bump
Report Abuse
blocksee2 is not online. blocksee2
Joined: 23 Jul 2011
Total Posts: 2659
18 Jun 2013 06:29 PM
Yeah, I can't help you without the output saying something.



~I ᴅᴏɴ'ᴛ ᴋɴᴏᴡ, I ᴋɴᴏᴡ ʀɪɢʜᴛ?~
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
18 Jun 2013 06:30 PM
Run this code since you can't post the output:

script.Parent.MouseButton1Click:connect(function()
print("Button1 click.")
script.Parent.Image = "http://www.roblox.com/asset/?id=106542518"
print("Image works")
script.Parent.Parent.Parent.PFrame.Frame.Visible = true
print("Visibility works")
if script.Parent.Parent.Parent.PFrame.Frame.Visible == false then
print("If statement has been accessed.")
script.Parent.Parent.Parent.PFrame.Frame.Visible = false
print("Visibility is now false.")
end
script.Parent.Power:Play()
print("Sound played.")
wait(5)
script.Parent.Image = "http://www.roblox.com/asset/?id=106542506"
print("2nd image loaded.")
end
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
18 Jun 2013 06:30 PM
BUMP!
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