Making animation play when player clicks + mount tool to hand without it being visible in backpack

Hello.
I am looking to Making an animation play when player clicks + mount a tool to his hand without it being visible in backpack.

Edit: We are also hiring, so if you are interested, DM me

1 Like

Wait what, 10 years of experience in scripting and you’re not able to do something as simple as that ? :sweat_smile:

Anyway, here is what you’re looking for, tell me if you have any questions

local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")
local PlayerService = game:GetService("Players")

local Player = PlayerService.LocalPlayer
local Mouse = Player:GetMouse()

local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid and Humanoid:WaitForChild("Animator")

local function PlayAnimation()
	local Animation = Instance.new("Animation")
	local Track = nil
	
	Animation.AnimationId = "" --Your animation id
	Track = Animator:LoadAnimation(Animation)
	Track.Looped = false
	Track:Play()
end

Mouse.Button1Down:Connect(PlayAnimation) --Play Animation when left mouse button clicked
UserInputService.TouchTap:Connect(PlayAnimation) --Play Animation when touch mobile screen
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) -- Disable backpack so tools aren't visible
1 Like

When you say “mount a tool to his hand without it being visible in backpack”, do you mean equip it when a certain key or mobile button is pressed?

1 Like