I am trying to make a fishing game but if the person unequips the fishing pole while fishing everything go bonkers.
Is there a way i can make an item unequippable during a period? or even forever?
I am trying to make a fishing game but if the person unequips the fishing pole while fishing everything go bonkers.
Is there a way i can make an item unequippable during a period? or even forever?
Just use something simple like this
local tool = script.Parent
tool.Unequipped:Connect(function()
local forceequip = true
local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
local Humanoid = player.Character:FindFirstChild('Humanoid')
if forceequip == true then
Humanoid:EquipTool(tool)
end
end)
Consider accepting this answer if it helped you as it will give us both reputation
Or you could disable the backpack but i don't think you want that.
Workspace.Player1.Humanoid:EquipTool(Workspace.FishingPole)
I'm pretty sure you can just run this at any instance where you want the tool to be equipped forcefully. You can then use UnEquip to end it, and give the player back the choice on whether or not to equip through their backpack. (This is usually used for avoiding animation cancels or interrupting cut-scenes, which might be what you're looking for.)
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
wouldnt that still unequip the tool and then re-eqeuip it really fast?
im looking for something where they literally cannot unequip it
I think this allows the player to unequip the tool at an instant and re-equip it instantaneously. I would suggest trying this script and if things still "go bonkers," let us know.
Then the only option i see is to temporary disable the backpack