when you hold a tool in roblox the players arm sticks out. Is there anyway to keep it stationary without the use of new animations?
If you boot up a character in your game, you can copy the “Animate” script from that character and remove the sections regarding “toolnone.” Pasting your edited script into the StarterCharacterScripts
folder will override the default script with your new one and should prevent this behavior. Here are the two code snippets that need to be removed and their starting lines:
Line 74, the assignment portion:
toolnone = {
{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
},
Line 651, the implementation portion:
if (toolAnim == "None") then
playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
return
end
This will prevent the player’s arm from sticking out but also won’t prevent any other animations, such as the player’s idle or walk animations.
is there any way of doing this without directly modifying the players animate script?
During runtime, the Animate
script that gets added to the character contains a variety of StringValues
with Animations
under them. You can create a blank animation and then assign it to the Animation.AnimationId
of the Animation
objects under the “toolnone” StringValue
that generates, and this will overwrite the default tool animation.
Yes, the simplest way to do this would be to disable the RequiresHandle Boolean property in the tool, and then just rename the part inside the tool to anything but “Handle.” This is how games get you to hold items without you sticking your hand out, hold items with your left hand, and also hold items with animated joints. (Like a spinning revolver!)