Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I detect when the backpack is opened or closed?

Does anybody how to pass a signal when a player opens or closes the default roblox backpack, or if it's even possible? I'm trying to add an xp bar to the top of the backpack hotbar so I need to make it transparent or not visible when the backpack is opened, but I don't know how to detect when the backpack is toggled. Please help!

1 answer

✓ Accepted answer

I don't believe there is a function for the player opening the backpack... I looked in the object browser which is a very useful source for looking for functions and properties of objects. There probably isn't a function for toggling it because it's in CoreGui.

But here are some solutions:

  1. Make a custom backpack with a GUI button. The GUI button will use the function "MouseButton1Click" or another function. That could trigger the backpack toggling.

  2. Make a key-press-event which there are many helpful Youtube tutorials. I think the button for opening the backpack is "~" but if your game is going to be on mobile you may run into issues with this.

I hope I've helped.

2 comments

0

Only answer so far so ig I'll mark it as correct for now.

0

Thanks, sorry I didn't have much.

This discussion is preserved as it was. New answers, comments, and votes are closed.