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: Visual Basic Help?

Previous Thread :: Next Thread 
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 12:36 PM
Why wont this work, Ive tried everything :C

Private Sub OptionsBtn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionsBtn1.Click
If Music = 1 Then
My.Computer.Audio.Stop()
Me.OptionsBtn1.Text = "Music? -OFF-"
Music = 0
End If
If Music = 0 Then
My.Computer.Audio.Play(My.Resources.Hail_to_the_Chief, AudioPlayMode.Background)
Me.OptionsBtn1.Text = "Music? -ON-"
Music = 1
End If
End Sub
Report Abuse
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 12:38 PM
Oh ya and, at the top of the script I have "Music" defined as 1
Report Abuse
noobkid is not online. noobkid
Joined: 17 Sep 2007
Total Posts: 649
08 Feb 2012 12:40 PM
"Music = 0
End If
If Music = 0 Then"
Doesn't that mean that you can't turn it off
Report Abuse
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 12:49 PM
I want it to every time you click it, it alternates between on and off.
Report Abuse
Jeanluc122 is not online. Jeanluc122
Joined: 29 Nov 2008
Total Posts: 678
08 Feb 2012 01:23 PM
Like a timer?
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
08 Feb 2012 01:25 PM
I think he means like a button that toggles between on/off.

~I script Awesome sauce to go with my spaghetti code
Report Abuse
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 01:26 PM
@MrGamesNWatch

Yes I do mean that :D
Report Abuse
Jeanluc122 is not online. Jeanluc122
Joined: 29 Nov 2008
Total Posts: 678
08 Feb 2012 01:27 PM
Do you have visual studio,

Also, paste the whole script if you could,
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 01:29 PM
noobkid is right.



Private Sub OptionsBtn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionsBtn1.Click
    If Music = 1 Then
        My.Computer.Audio.Stop()
        Me.OptionsBtn1.Text = "Music? -OFF-"
        Music = 0
    Else
        My.Computer.Audio.Play(My.Resources.Hail_to_the_Chief, AudioPlayMode.Background)
        Me.OptionsBtn1.Text = "Music? -ON-"
        Music = 1
    End If
End Sub
Report Abuse
Jeanluc122 is not online. Jeanluc122
Joined: 29 Nov 2008
Total Posts: 678
08 Feb 2012 01:30 PM
So at one point you do have something along the lines of...

Dim Music as integer = 0

Amiright?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 01:31 PM
I'm assuming Music is a global integer. We'll just have to wait and see what OP says. ^_^
Report Abuse
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 02:03 PM
And I do say :P Yes, I have Music defined as a "Public" (Global) Interger and I would like it to switch on and off...
Report Abuse
austin615 is not online. austin615
Joined: 02 Jan 2013
Total Posts: 125
08 Feb 2012 03:48 PM
Help, Pl0x?
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
08 Feb 2012 03:52 PM
Javascript > VBScript, no?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 05:57 PM
VB <> VBScript, no?
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
08 Feb 2012 09:15 PM
Wait they're the same thing right? VB and VBScript
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