How do you disable roblox tool animation but for only one tool?

How do you do this

but only for a single tool

local NOHANDOUT_ID = 0000000 -- paste animation without keyframes here


local function DisableHandOut(character)
	local Animator = character.Animate
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "http://www.roblox.com/asset/?id="..NOHANDOUT_ID
	
	local ToolNone = Animator:FindFirstChild("toolnone")
	
	if ToolNone then
		local NewTool = Instance.new("StringValue")
		NewTool.Name = "toolnone"
		Animation.Name = "ToolNoneAnim"
		Animation.Parent = NewTool
		ToolNone:Destroy()
		NewTool.Parent = Animator
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		DisableHandOut(character)
	end)
end)

Nevermind, figured it out on my own :smiley:

local NOHANDOUT_ID = 17210012458 -- paste animation without keyframes here


local function DisableHandOut(character,part,partparent)
	local Animator = character.Animate
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "http://www.roblox.com/asset/?id="..NOHANDOUT_ID

	local ToolNone = Animator:FindFirstChild("toolnone")
	local ToolNoneClone = ToolNone:Clone()
	if ToolNone then
		local NewTool = Instance.new("StringValue")
		NewTool.Name = "toolnone"
		Animation.Name = "ToolNoneAnim"
		Animation.Parent = NewTool
		ToolNone:Destroy()
		NewTool.Parent = Animator
		character.ChildRemoved:Connect(function(part2)
			if part2 == part then
				NewTool:Destroy()
				ToolNoneClone.Parent = Animator
				return
			end
		end)
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character.ChildAdded:Connect(function(part)
			if part.Name == "LobbySword" then
				DisableHandOut(character,part,part.Parent)
			end
		end)
	end)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.