Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make an uneuip/equip system?

Asked by 5 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I tried and i failed, so I need help on like how to make a gui with an equip and unequip button for weapons and how you keep them quipped on death kind of like mm2 or zombie rush..

0
You need to show the code, that way we can tell you what you did wrong and tell you how to improve. xJigoku 17 — 5y
0
No requests, and at least provide your code so we can try fixing it starmaq 1290 — 5y

1 answer

Log in to vote
2
Answered by
Zeluxis 100
5 years ago

Due to the fact no code was given, I'll just tell you a way you could go about doing it.

This is rough and not at all efficient, but just a way you could go about doing it.

Make a DataValue folder within the Player when they join. Within that they could have a Boolean Value stating what gun they currently have, if any.

When you click "Equip" on a gun within the UI, make the value change to the name of the gun. After that, you could have a RemoteEvent fire to the server what gun you have chosen and to clone it into their starterpack.

Make a seperate script that detects when a player dies. Once their character loads back in, make it so the server script clones the gun into the inventory once again. This can be easily done by checking what gun is in the Boolean Value and cloning it from a folder.

As I said before, this could probably be made more efficient, but it's a rough idea of how you could go about it.

Search up RemoteEvents, Cloning and values on the wiki to try and find out more.

Hope this helps!

0
+1 for not spoonfeeding a request. RubenKan 3615 — 5y
Ad

Answer this question