I have some animation scripting issues

local Animator = script.Parent

local DrawStand = Animator:LoadAnimation(Animator.Animation)

DrawStand:GetMarkerReachedSignal('go back'):Connect(function(value)

DrawStand.TimePosition = 0:07 --this value here i cant figure out

end)

DrawStand:Play()

how do you know where your time position is gonna end up?
i tried 0.07 but it ended up in the wrong place

by the wrong place i meant it reset the animation but it kept playing which means its looping fine

1 Like

.TimePosition is in seconds so the value would be 7 for 7 seconds.

1 Like

for those reading wanting to know how to get the correct time position
i made a nice little formula for you

1 / FPS * Frame

FPS = the frames per second Your Animation Is Animated In
Frame = the frame you want your animation to be timed at (in my case it is 0.07 which is frame 7)

local Animator = script.Parent

local DrawStand = Animator:LoadAnimation(Animator.Animation)

DrawStand:GetMarkerReachedSignal('go back'):Connect(function(value)

   DrawStand.TimePosition = 1 / 30 * 7 --look at this

end)

DrawStand:Play()
1 Like