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

How do you accurately "animate tools" ?

Asked by 6 years ago
Edited 6 years ago

I'm trying to make a little animation where you flip a flashlight you're holding when you press T,

local function Tween(instance, Time, goal, Style)
    return game:GetService("TweenService"):Create(instance, TweenInfo.new(Time), goal, (Style or Enum.EasingStyle.Quad)):Play()
end

local toolGoals = {}
toolGoals.GripForward = Vector3.new(0, 0.087, 0.996)
toolGoals.GripPos = Vector3.new(0, -1.23, 0.282)
toolGoals.GripRight = Vector3.new(-1, 0, 0)
toolGoals.GripUp = Vector3.new(0, 0.996, -0.087)
Tween(tool, 5, toolGoals)

I tried to tween the grip data (like seen above)..

My result: https://youtu.be/hxO1ABHyPbo?t=1

I expected this to just go up and turn towards the head like it does at the end, but for some reason it's turning right at first then like halfway through turning around.. Any ideas how to fix this, or a better way to animate my flashlight?

1 answer

Log in to vote
0
Answered by 6 years ago

I found the answer in the dev forums (https://devforum.roblox.com/t/animating-a-player-as-well-as-a-tool/80193/2?u=ilordofaviation)

Instead of deleting the question I decided to leave it up to maybe help someone else that finds this thread googling, idk

All you have to do is put a Motor6D with either the Part0 or Part1 pointing to the tool part and the tool part appears in the Roblox animation editor

Ad

Answer this question