#How do I prevent people from dual wielding?

1 messages · Page 1 of 1 (latest)

slate hornet
#

Im making a PVP game and I dont want people holding more than one weapon.
(Its paintball weapons by the way, not actual custom weapons.)

minor granite
#

you'd need a delay between picking it up and dropping it, though, which can break

#

I have thought of a better method, but have not tested it: when a player picks up an item, give them a role that blocks them from picking up all items. When they drop an item, remove the role

#

(You can do that by editing the role, going to the restricting pick up section, and blocking all. Items already held don't get unequipped, I believe!)

rustic raven
#

then an event recviver with update

#

and use an if is valid and if has tag twice for each hand

#

and give all the weapons a tag that you will put into the if has tag

minor granite
#

That uses more cpu than necessary

#

if doing it that way, you only need to check when an item is picked up

rustic raven
#

from my experience it takes like 1/10-1/5 of an fps

minor granite
rustic raven
minor granite
#

and, in my opinion, would be a smoother user experience

rustic raven
#

(depending on if you are holding something)

#

dont trust delays ever

minor granite
#

it's just using the built in item restriction feature lol

#

functions better, less chips, less cpu

slate hornet
#

since things such as holding a grenade and a gun would count as a dual wield with your idea

#

giving the weapons tags would just be better

slate hornet
#

@rustic raven how tf do I connect the and chip

minor granite
#

the pickup restrictions has a tag feauture

minor granite
minor granite
#

as that will output a bool

tawny raven
#

Player get Equipped items
• Dominant If is valid
Has tag (Your Tag)
• Off-Hand If is valid
Has tag (Your Tag)

• Both has tags to an And
And to an if (on true) - unequip

slate hornet
tawny raven
rustic raven
slate hornet
#

its over