Joined
·
17 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
estroy()
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
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
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