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

Help disable tool unequip?

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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
0
If you wanted to disable it, it'd be Tool.CanBeDropped = false, not true. killerbrenden 1537 — 4y
0
oh, thanks, that was misprint GravityGouse99938 75 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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..

Answer this question