Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you make a tool get held differently?

Asked by 9 years ago

Before you answer- "GripForward,GripPos,GripRight,GripUp", that's not the answer I need.

Basically, I've noticed that when you hold a tool, your right arm automatically swings out in front of you. I'm making a tool with custom animations, and this screws it up. Is there a way to change it?

Thanks; all replies are appreciated,

-Tortelloni

1 answer

Log in to vote
0
Answered by 9 years ago

I think I would do something like

--in tool
local animation = --set animation
local tool = script.Parent
local canplay = true --obvious

tool.Equipped:connect(function()
if canplay then
canplay = false --this makes sure the animation only runs once
local track = tool.Parent:FindFirstChild("Humanoid"):LoadAnimation(animation) --animation track
track:Play()
track.KeyframeReached:connect(function(keyframe) --keyframe is the keyframe name
if keyframe == "end" then --make sure the last keyframe is named "end"
canplay = true
end
end)
end
end)

That might not work, but I don't have access to studio right now. I'm just saying it's SOMETHING like that. Or, if you meant you don't want your arms to raise out in front of you, you might want to use welds, or an animation paired with welds.

Ad

Answer this question