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

Help disable tool unequip?

I am trying to make a suicide vest thats timed but if you activate it and then unequip the tool, the explosion happens wherever the tool was unequipped. Is there a script I can use to disable unequipping or make you auto-equip if you try to unequip the fool?

2 answers

Try to go to the Tool properties, and disable CanBeDropped property, or you can use a script for it as well. For example:


local Tool = script.Parent

Tool.CanBeDropped = false

2 comments

0

If you wanted to disable it, it'd be Tool.CanBeDropped = false, not true.

0

oh, thanks, that was misprint

Explanation

This is really easy. You can disable the CanBeDropped in the Tool's property. You can either do that by disabling it manually or by a script.

CanBeDropped can be found under the Tool's property and if you set this to true, the player would be able to drop it else if false, player would not be able to drop the tool..

Solution

local suicideVest = script.Parent -- Define the variable for the tool

suicideVest.CanBeDropped = false -- Sets it to false so the player won't un equip or throw the tool by backspace..

I hope this helps you and please up vote and select this as the answer if it did so..

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