Having a tool always equipped

G’day! As the title says, I want my tool to always be equipped when it cloned into the player’s backpack.

In more detail, when the player selects the sword from a GUI, it will be cloned into the player’s backpack and have the sword instantly equipped, therefore playing its idle animations. I don’t want the player to be able to unequip the sword unless they chose a different one from the game’s GUI menu.

Any ideas on how i could achieve this?

Sword Animation:

Use this and disable the Backpack CoreGUI Humanoid | Documentation - Roblox Creator Hub

I can’t think of a method on how to completely prevent the tool from being unequipped, but what you could do is when the player unequips the tool, you immediately equip it again. And then when a player clicks the ui to select another sword, you can remove the sword that’s the player had chosen before, and clone the new one into the player’s backpack.

I’ve seen in other posts that I have to disable the Backpack and use EquipTool but, since I am no big programmer myself, I got lost.

1 Like

Am I doing it wrong? I disabled the Backpack CoreGUI with this local script located in Replicated First:
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

And this is a script thats fired via RemoteEvent when the GUI button for the sword has been clicked:

local ServerStorage = game:GetService("ServerStorage")
local Greatsword = ServerStorage.Greatsword

ReplicatedStorage.PickWeapon.OnServerEvent:Connect(function(player)
	local GreatswordCopy = Greatsword:Clone()
	local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		humanoid:EquipTool(GreatswordCopy)
	end
	end)

The sword is not equipped nor to be found anywhere in the player’s model.

I’ve parented the tool to the player and the animation starts playing because it detects the tool but the tool is not shown in-game.

Nevermind I forgot to parent it to the player’s backpack.