Adding Weapons Help!

Not really but would affect the adding process to the inventory, because this whole script doesn’t check the backpack.

Oh, you would have to add the backpack into the code just because when the tool is cloned and not parented it won’t allow the ability to equip the tool when clicking the GUI I’m pretty sure.

Yeah, but the problem is that it doesn’t appear in the inventory. So even if I add the part that will put it in, I wouldn’t be able to test it because the UI doesn’t show up. There is no errors, so I’m not sure why it’s not getting added.

Can I see the code for what happens when you click the equip button for the tool?

I don’t have a script for that. The only thing I scripted is for the Item to show up in the inventory, so i can make a script to equip it. but it doesn’t show up in the inventory.

Are you using custom inventory GUI or did you remove the CORE roblox gui?

This is the current inventory Ui:

You have to use a script to overload the GUI like this: image

I just want to add the weapon to the inventory, like image you showed that game has it’s own inventory.

Alright, but you are overriding the gui for backpack in roblox? That’s the only possible way to sync up the UI with equipping it.

What do you mean by overiding the gui? Changing the current roblox inventory to the one I made? I don’t think you do, because I made a game previously and I didn’t have to do any of that.

Well that is one way, you can also do if the tool is in the players backpack, then activate the viewport frame to show the weapon.

Yeah but currently I am trying to make it so when a player joins the game and they own that weapon from the datastore then it will add that item into the inventory, and the code I sent should be able to do that but for some reason it doesnt.

API services are enabled? If your using a pcall in the datastore, is it returning an error?

I am using datastore2 and API services are enabled.

Alright have your previous gamed used the same datastore2? I’m not entirely experienced with it but does it save tool’s as well?

My other game was really messy with datastores, but yeah It did save data and add it to the inventory. This game I making relies of table saves instead of instances.

Alright each method can work technically, so if your datastore is not working properly resort to your old one. It should work fine if you just saved tools without datastore2, but feel free to choose your way.

Thanks for help! I will try and figure it out.

1 Like

Alright, DM: cameron;#0001. My tag, if you have any issues, It’s hard to explain without all the code. Sorry about it.