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: GUI Error

Previous Thread :: Next Thread 
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:30 AM
So, I am having a continuing error with a GUI that I have been making.

The basic concept is to start with the main GUI "Open Radio" in the top left side of the screen, which (once clicked) will open a side GUI accessing audio options.


I have been receiving this error in my output log every time I test:

Players.Player1.PlayerGui.ScreenGui.Audio.Frame.TextButton.:17: attempt to index global 'MouseButton1Down' (a nil value)


The Explorer structure is as follows:

StarterGui
ScreenGui
Audio
Frame
TextButton
Script
TextLabel
TextButton
Script


The Main script (On the bottom) is to open the second GUI and looks like this:

-- [ Variables ] --

Open = Game.PlayerGui.ScreenGui
Frame = Game.PlayerGui.ScreenGui.Audio.Frame
Welcome = Game.PlayerGui.ScreenGui.Audio.Frame.TextLabel
Choice1 = Game.PlayerGui.ScreenGui.Audio.Frame.TextButton


-- [ Script ] --



function Clicked()
Frame.Visible = true
Welcome.Visible = true
Choice1.Visible = true
AudioValue = true
end
Open.MouseButton1Down:connect(Clicked)


function DoubleClicked()
Frame.Visible = false
Welcome.Visible = false
Choice1.Visible = false
AudioValue = false
end
Open.MouseButton1Down:connect(DoubleClicked)



I have edited the MouseButton1Down to MouseButton1Click and back, but have the same results, I also moved the variables to PlayerGUI hoping that would work.

I can imagine this is probably something stupid that I missed, but I am going to continue searching for the problem while waiting for suggestions.
(No I will not switch this to "OnClick" as I will have to re-do the entire GUI.)
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:33 AM
I also need this working by tomorrow, otherwise I will be set back on another project.
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:38 AM
There error is pointing to the first (upper) script, but this script is very simple, I can't see what I missed, it could be the same problem:

function Clicked()
playsound(130767611)
end




MouseButton1Down:connect(Clicked)
Report Abuse
TermoBloxer is not online. TermoBloxer
Joined: 03 Jan 2011
Total Posts: 368
09 Jun 2014 02:41 AM
I'm having a rather similar issue, but I think yours doesn't work because you didn't define what the player would be clicking on.
Report Abuse
TermoBloxer is not online. TermoBloxer
Joined: 03 Jan 2011
Total Posts: 368
09 Jun 2014 02:42 AM
I think it would be more like:

Button.MouseButton1Down:connect(Clicked)
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:43 AM
How would I get around having a specific player clicking it without listing off the authorized players?

I would rather not spend the next few hours listing off 455 names.
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:50 AM
The error only changed to say:
Players.Player1.PlayerGui.ScreenGui.Audio.Frame.TextButton.:13: attempt to index global 'Button' (a nil value)
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 02:56 AM
Bump

(As much as it pains me to do so, I NEED this working before tomorrow)
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 03:08 AM
Again, I need a solution ASAP.
I honestly can't find out what is causing that issue because the script in question looks fine.

It is the:

function Clicked()
playsound(130767611)
end
Button.MouseButton1Down:connect(Clicked)


script producing the error, it has changed from the original error value.
(17 to 13)
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 03:13 AM
Ugh... I am being forced behind so far... I needed this done tonight...
Report Abuse
golfercab is not online. golfercab
Joined: 26 Sep 2011
Total Posts: 714
09 Jun 2014 03:17 AM
could you paste the entire script please? =x

sounds:
http://wiki.roblox.com/index.php?title=Sounds
Report Abuse
Venustheplanet is not online. Venustheplanet
Joined: 01 Apr 2009
Total Posts: 184
09 Jun 2014 01:22 PM
The Entire script is on the top of the post (the main article) and the secondary script was posted shortly after.
Report Abuse
golfercab is not online. golfercab
Joined: 26 Sep 2011
Total Posts: 714
09 Jun 2014 04:20 PM
i did not see "AudioValue" being assigned to anything

also I thought to play music you had to do something like:

game.Audio.(soundname):play()

not sure though, try using the wiki?
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