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

How to lock de-equip tool?

Asked by 9 years ago

Ok, So I made a localscript where I can lock first person camera when they equip their tool. But how do I disable tool de-quiping? Here is my localscript:

local p= game.Players.LocalPlayer
local tool= script.Parent
function equipped()
wait()
p.CameraMode= 1
end
function unequipped()
wait()
p.CameraMode= 0
end
tool.Equipped:connect(equipped)
tool.Unequipped:connect(unequipped)
1
What do you mean by 'Disable Tool 'de-equipping''? From how I'm looking at your code, it appears to be fine? TheeDeathCaster 2368 — 9y

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

To disable tool unequipping then set the property, 'CanBeDropped', of the tool to false.

Ad

Answer this question