I was wondering if there was a possible way to remove the holding animation on a tool.
When the player equips the tool I want it to just move with their hand.
I’ve tried changing the name of handle so that there is no handle but the tool does not stay on the characters hand and is just on the ground
Weld the tool parts to the player’s hand when equipped
Rotate the C0 of the arm 90 degrees when a tool is equipped.
local Tool = script.Parent
local Player = Tool.Parent.Parent -- we start in the Backpack of the Player.
local function RotateJoint(Angle)
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local RightShoulder
if Humanoid.RigType == Enum.HumanoidRigType.R15 then
local RightUpperArm = Character:WaitForChild("RightUpperArm")
RightShoulder = RightUpperArm:WaitForChild("RightShoulder")
else
local Torso = Character:WaitForChild("Torso")
RightShoulder = Torso:WaitForChild("Right Shoulder")
end
return function()
RightShoulder.C0 = RightShoulder.C0 * Angle
end
end
Tool.Equipped:Connect(RotateJoint(CFrame.Angles(-math.pi / 2, 0 ,0)))
Tool.Unequipped:Connect(RotateJoint(CFrame.Angles(math.pi / 2, 0 ,0)))
This will drop the tool–and the character will still hold out their arm.
Ah just forget it, they keep changing things
I welded it to the players right hand, how would I make it that the hand is not
inside the block
I have come up with my own solution after looking at what happens when the player equips the tool.
When you equip a tool Roblox looks to see if there is a handle, if there is it’ll put the hand up and add a weld. What I did was after the weld is created I changed the name from handle to block so that it isnt holding it up anymore.
here is the script which has a animation inside of it
script.Parent.Equipped:Connect(function()
script.Parent["Handle"].Name = "Block"
wait()
local Tool = script.Parent
local Player = Tool.Parent
Tool:FindFirstChildOfClass("Part").Transparency = 1
local animation = script:WaitForChild('Anim')
local humanoid = Player:WaitForChild('Humanoid'):WaitForChild("Animator")
dance = humanoid:LoadAnimation(animation)
dance:Play()
wait(.25)
Tool:FindFirstChildOfClass("Part").Transparency = 0
end)
script.Parent.Unequipped:Connect(function()
if dance then
dance:Stop()
end
wait()
local Tool = script.Parent
local Player = Tool.Parent.Parent
script.Parent["Block"].Name = "Handle"
Tool:FindFirstChildOfClass("Part").Transparency = 1
end)
1 Like