Roblox Forum banner
1 - 3 of 3 Posts

· Registered
Joined
·
17 Posts
Discussion Starter · #1 · (Edited)
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.

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

· Premium member
Joined
·
1,884 Posts
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.

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.
 

· Registered
Joined
·
17 Posts
Discussion Starter · #3 ·
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.
 
1 - 3 of 3 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top