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

Animation through Scripts?

Asked by
n9dean 5
8 years ago

Is it possible to create animations through a script? I know a guy who made an entire script for a script builder where you could press a button and your player does stuff. I "animate" in a different way, by moving the joints inside a torso, but the problem is; when I walk it still plays the default animation right over the rotated joint, is there another way to actually animate?

0
I really want to animate, without any plugin of the sort. n9dean 5 — 8y
0
He mention something called 'Linear Interpolation' n9dean 5 — 8y
0
I guess you could weld the parts and move them slightly for each frame, of the animation, but this will be incredibly tedious. Mystdar 352 — 8y

1 answer

Log in to vote
0
Answered by
Reselim 35
8 years ago

If I'm correct, what you're wanting to do is make it so the default animations don't play over yours.

To remove the animation script when someone enters the game, use this code:

game.Players.PlayerAdded:connect(function(p) -- hook up to PlayerAdded
    p.CharacterAdded:connect(function(c) -- hook up to CharacterAdded from the Player object
        c:WaitForChild'Animate'.Disabled = true  -- make it so the script doesn't error
        c:WaitForChild'Animate':remove() -- remove the script
    end)
    repeat wait() until p.Character
    p.Character:WaitForChild'Animate'.Disabled = true -- repeat this, because the event has already fired before we connected it.
    p.Character:WaitForChild'Animate':remove()
end)

And to manipulate CFrames, use CFrame:lerp() .

Hope this helped!

Ad

Answer this question