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: I need to temporarily get rid of the backpack core gui

Previous Thread :: Next Thread 
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:35 AM
For my in-game store, I need to hide the backpack while your in the store, and I was able to get someone to make it work for me, but it's glitchy. When I open the store, the backpack goes away, and when I close the store, the backpack comes back, but I'm not able to click on my gear normally. So there's some issue with disabling/enabling the coregui. Does someone know how I can prevent this glitch? And if so- can you provide a script or line of code that could help me? Thanks
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 02:35 AM
Whats the code he used to disable and enable it
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:41 AM
He separated it in 3 scripts:

local open = script.Parent.Open
open.MouseButton1Down:connect(function()
if script.Parent.Frame.Visible==false then
script.Parent.Frame.Visible=true
script.NOTViewPlayerList.Disabled=false
script.ViewPlayerList.Disabled=true
open.Visible=false
elseif script.Parent.Frame.Visible==true then
print("Already Invisible")
end
end)
script.Parent.Frame.Exit_Button.MouseButton1Down:connect(function()
script.Parent.Frame.Visible=false
open.Visible=true
script.NOTViewPlayerList.Disabled=true
script.ViewPlayerList.Disabled=false
end)


-------------------------------------------------------------------



game.StarterGui:SetCoreGuiEnabled("All",false)
game.StarterGui:SetCoreGuiEnabled("Health",true)
game.StarterGui:SetCoreGuiEnabled("Chat",true)



----------------------------------------------------------------------



game.StarterGui:SetCoreGuiEnabled("All",true)

Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 02:42 AM
omg ew
that hurt my eyes
needs to be rewriten and should not take 3 scripts, should take one, much shorter than that
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:44 AM
Well.. Someone else scripted it for me. I don't script, do you think you might be able to help me with the problem?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 02:46 AM
Trash the second 2 scripts and put this one where the first one is, in a local script


local open = script.Parent.Open
open.MouseButton1Down:connect(function()
if script.Parent.Frame.Visible==false then
script.Parent.Frame.Visible=true
Game.StarterGui:SetCoreGuiEnabled("Backpack", false)
open.Visible=false
elseif script.Parent.Frame.Visible==true then
print("Already Invisible")
end
end)
script.Parent.Frame.Exit_Button.MouseButton1Down:connect(function()
script.Parent.Frame.Visible=false
open.Visible=true
Game.StarterGui:SetCoreGuiEnabled("Backpack", true)
end)
Report Abuse
Legoman654 is not online. Legoman654
Joined: 05 Jun 2008
Total Posts: 534
24 Jul 2014 02:50 AM
Beat me to it, eh:


script.Parent.Open.MouseButton1Down:connect(function()
if script.Parent.Frame.Visible == false then
script.Parent.Frame.Visible = true
script.Parent.Open.Visible = false
game.StarterGui:SetCoreGuiEnabled("Backpack", false)
game.StarterGui:SetCoreGuiEnabled("PlayerList", false)
end
end)

script.Parent.Frame.Exit_Button.MouseButton1Down:connect(function()
script.Parent.Frame.Visible = false
script.Parent.Open.Visible = true
game.StarterGui:SetCoreGuiEnabled("All", true)
end)



That should also work ^ Less lines also
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:54 AM
128GB, you're script didn't really work q, like um, when you open the store, now all the coregui's stay. I'm going to try the other one and see if that one works
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 02:55 AM
free advertisement

http://www.roblox.com/Script-SetCoreGui-item?id=154870125

I made this it puts bool values in the player (PlayerObject not Character)
that change the coregui so you can change them from a non local script
but yah
Its a wip but it works (Im going to rewrite it one day when I stop being lazy)

(Vurse you don't need this unless for some reason you cant make your script local)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 02:55 AM
You said hide the backpack not every coregui
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:56 AM
Well the backpack doesn't hide either, but the script I gave you hid every coregui so em..
Report Abuse
Legoman654 is not online. Legoman654
Joined: 05 Jun 2008
Total Posts: 534
24 Jul 2014 02:56 AM
I just based my code off the snippet that he provided. It seemed that his original code was hiding the backpack and the playerlist when the GUI was opened.
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 02:58 AM
Yeah that's how it should be. It's just the glitch that's caused when the backpack is unhidden that I need to fix.
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 03:01 AM
Oh whoops, sorry, it wasn't in a local script >_>, I put it in one and now it kind of worked. Heh. The glitch is still caused though, when the backpack re opens
Report Abuse
Legoman654 is not online. Legoman654
Joined: 05 Jun 2008
Total Posts: 534
24 Jul 2014 03:03 AM
Do hotkeys still work? As in the 1-9/0? Or is it just when you try clicking on the items?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 03:04 AM
Can we see the gui?
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 03:06 AM
Hotkeys work to choose items, but when you click on them nothing happens. One sec, I'll upload a model of the GUI and put a link
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 03:10 AM
http://www.roblox.com/unnamed-item?id=168048475
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 03:18 AM
After testing it appears its a glitch on roblox's side

Try cloning everything in the players backpack and then clearing their backpack then inserting the clones back

Testing with a script that wasn't from your gui, it seem disabling the backpack then reenabling it causes the hotkeys to work, but clicking on the image to act as if you had the backpack open (Also removing the hokey and hiding the tool in your backpack when you let it go)
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 03:20 AM
Yeah, I told my friend to make it so when you open the store, all your items are copied and put away, and when you close the store, they're given back to you, because I noticed when you get rid of all your items the core gui naturally closes and the glitch doesn't happen.. But he said it would be really hard to do
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 03:22 AM
It wouldn't be hard to do at all, one second
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 03:35 AM
I did the clone thing whatever
Didn't fix the problem
So yah
Blame John.
Does anyone every really click on the tool and not use the hotkeys anyway?
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 03:42 AM
Well I'd say half of people may click instead of use hot keys. I click. I was able to get it to not glitch by doing this: While the backpack is open, if you get a tool, and then backspace (remove the tool) then your backpack goes away naturally. Then, once you get another tool, your backpack will come back naturally, and the glitch will not happen. I thought that's what you were talking about. The idea would be to make it so that once you open the store, in a split instant, all your items are copied and taken away (And if you don't have an item, you're given a temporary item so something can be taken away) Once all your items are taken away, your backpack will dissapear. Then, once you close the store, your items would be given back, unhiding the backpack naturally, thus not causing the glitch.. Would there be a way to make this happen with scripts?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 12:30 PM
So you no longer want to get rid of the backpack gui, just remove all their tools till they close the store?

Or you have it like that currently?
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
24 Jul 2014 01:51 PM
Once you spawn in a game, naturally, your backpack is visible. If you get a tool, and then remove that tool, your backpack disappears naturally. I still want to get rid of the backpack, but if you use a script to 'disable coregui' it will cause the glitch to happen, so the only way to get rid of it without getting the glitch, is to take away all of a person's tools once they open the store, thus making the backpack disappear. (Also, if someone doesn't have any tools, there could be a temporary tool given to them, so that something could be taken away.) Once they leave the store, they will be given their tools back, which will give them back their backpack.
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