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

Previous Thread :: Next Thread 
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 03:17 PM
So I have a game (Check it out it's called Button Man) and the GUI works in the studio fine but doesn't work in game... Nothing in output either. It's a local script within a screen gui, within starter gui

Script:

Box = script.Parent.Frame
Button = script.Parent.TextButton
Open = false
Label = Box.TextLabel
Button.MouseButton1Down:connect(function(open)
if Open == false then
Button.Text = 'Close'
Box.Visible = true
Label.Visible = true
Open = true
else if Open == true then
Button.Text = 'Open'
Box.Visible = false
Label.Visible = false
Open = false
end
end
end)

Thanks, Weaselover2
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
28 Jan 2017 03:23 PM
Use prints to see which pars of the script run and which don't
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 03:24 PM
It works fine in Studio appears and disappears at click it just doesn't work in game...
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
28 Jan 2017 03:27 PM
theres a space between "else" and "if" which is not supposed to be there.

Its "elseif"
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 03:29 PM
Thanks I'll see If that is the fix.
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 03:32 PM
Still not working >:(

Thanks for help.
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 03:38 PM
It would make my day if someone had a fix :):):):)

Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
28 Jan 2017 03:54 PM
it would make my day if people actually read my replies and tried them instead of ignoring them :):):)
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:06 PM
Like I said there is nothing going wrong in the studio... It works like a charm. But when I published and tried it on the website it wouldn't work

Thanks.
Report Abuse
JellyJarFull is not online. JellyJarFull
Joined: 17 Oct 2016
Total Posts: 111
28 Jan 2017 04:09 PM
Aren't you supposed to put 'local' before Box, Button, Open, and Label? Because I thought this was the case when naming variables in local scripts. I might be wrong
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:09 PM
I'll try that.
Thanks.
Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
28 Jan 2017 04:13 PM
No it just makes them global(to a certain extent) and reduces the performance
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:15 PM
Adding local didn't work could this be a glitch in the Studio???
Report Abuse
Aorda is not online. Aorda
Joined: 13 Jan 2012
Total Posts: 243
28 Jan 2017 04:18 PM
You probably made the locations of the things wrong, check those.

Also check the Developer Console, it should print what's wrong
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:22 PM
Ok what is the Developer Console I am new to Game Dev
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:26 PM
So the Screen Gui is inside the Starter Gui and then inside that is the LocalScript , Frame and TextButton.
Inside the Frame is a TextLabel
Report Abuse
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
28 Jan 2017 04:28 PM
Been having this problem with Local objects as well.
I think it's just very specific or borderline broken.
Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
28 Jan 2017 04:30 PM
That's strange should I report it?
Report Abuse
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
28 Jan 2017 04:33 PM
Nah.
Report Abuse
Aorda is not online. Aorda
Joined: 13 Jan 2012
Total Posts: 243
01 Feb 2017 03:33 PM
@Weaselover2 Okay so Developer Console is the thing, which everything gets printed on. When you type "print('SomeText')" in a script, "SomeText" appears on the Developer Console. Developer Console also shows the errors in scripts, and lets you run commands. To open it, test the game in studio, or play it, then press "F9" key. It will open, and it will show you the errors. The errors are red colored.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
01 Feb 2017 03:35 PM
local gui = script.Parent
local bool = false

gui.MouseButton1Click:connect(function()
bool = not bool
gui.Visible = bool
if bool then
gui.Text = 'Close'
else
gui.Text = 'Open'
end
end)


Report Abuse
Weaselover2 is not online. Weaselover2
Joined: 29 Aug 2013
Total Posts: 130
02 Feb 2017 06:59 PM
Anyone who was wondering, I just erased the GUI and remade it and it started working ... :P Also, is Developer Console the same thing as Output?
Report Abuse
Aorda is not online. Aorda
Joined: 13 Jan 2012
Total Posts: 243
17 Feb 2017 12:53 PM
Kinda... Developer Console can be used in-game too.
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