Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

How to make specific gears not play the "hand out" animation

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

AceApex

New Member
Reputation: 0 / 0 / 0
Feb 23, 2021
17
1
3
Roblox
Tryingtodietoday
What I want to achieve basically is make a tool/gear, but when you equip it your character doesn't hold the gear out in front of you. I looked it up in a devForum, and got this script that works almost exactly as I want it to:

This is the script I use to disable the handle animation.

ServerScriptService:

local NOHANDOUT_ID = 04484494845

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)

(btw, the script is in ServerScriptStorage)

It works perfectly fine, however it does the same thing for every gear in the starter pack / workspace, and I only want it to play on certain tools. Is there a way to do that? Like, could I put the script IN the tool somewhere and it will only work for that tool? Or could I put the name of the tool in the script somehow somewhere? Any help is greatly appreciated. If you need me to explain more, I can try to go into further detail.
Post automatically merged:

oops looks like "ToolNone: Destroy()" got made into an emoji by default xdd
 
Last edited:

CallMeKY

Moderator
Ultra
Reputation: 6 / 0 / 0
Feb 25, 2018
1,630
71
764
113
Maine, USA
Roblox
CallMeKY
Discord
CallMeKY#5012
What I want to achieve basically is make a tool/gear, but when you equip it your character doesn't hold the gear out in front of you. I looked it up in a devForum, and got this script that works almost exactly as I want it to:

This is the script I use to disable the handle animation.

ServerScriptService:

local NOHANDOUT_ID = 04484494845

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)

(btw, the script is in ServerScriptStorage)

It works perfectly fine, however it does the same thing for every gear in the starter pack / workspace, and I only want it to play on certain tools. Is there a way to do that? Like, could I put the script IN the tool somewhere and it will only work for that tool? Or could I put the name of the tool in the script somehow somewhere? Any help is greatly appreciated. If you need me to explain more, I can try to go into further detail.
Post automatically merged:

oops looks like "ToolNone: Destroy()" got made into an emoji by default xdd
You'd need to weld tools to the player's hand on equip, but you can disable that by disabling the RequiresHandle property of the tool.
 
Solution

AceApex

New Member
Reputation: 0 / 0 / 0
Feb 23, 2021
17
1
3
Roblox
Tryingtodietoday
Thanks for the answer, I feel stupid for not realizing it sooner lol. This is basically exactly what I need. The only thing that might be a problem is the welding, but I think that I can figure that out myself.
 
Status
Not open for further replies.