Howdy. Posting noob as well as coding noob here-
I'm trying to figure out a way to animate an opening/closing door, by teleporting the pic related models into and away from a position a bunch of times.
Issue is, I'm not exactly sure how to do that, or where to begin codewise, other than assigning each "frame" of the animation a variable, and calling them back and forth.
How can I do that teleporting thing?
Is there a better way to achieve this desired animation effect?
These are essentially flat textures that I am trying to create an animation out of.
Monkey-tier TL;DR, I'm essentially trying to create an opening/closing door using "animation frames", but I'm not exactly sure how to accomplish this. Please review picrel, and help if you can!
[img]https://media.discordapp.net/attachments/454491193607454731/841630883416506379/unknown.png[/img]
[img]https://cdn.discordapp.com/attachments/454491193607454731/841631113566355466/unknown.png[/img]
[img]https://cdn.discordapp.com/attachments/454491193607454731/841631280327557120/unknown.png[/img]
note: the script is currently empty, because I'm not exactly sure where to start with something like this.
The best way to achieve the animation effect is by using Tween Service. It is very simple to use. Here's how it it goes:
--I'm only showing on opening the door. --You can add debounce and another CFrame to set both open/closing TS = game:GetService("TweenService") Part = _______________ -- The door main opening/closing part OpenPos = ____________ -- The CFrame the door will go to open Time = __ --The time in seconds it will take to open the door goal = {CFrame = OpenPos} -- Setting the Goal for tweening info = TweenInfo.new(Time) -- Setting the Time for tween Tween = TS:Create(Part, info, goal) Tween:Play() -- Call this anytime to run the opening tween
I'm not sure what exactly you mean by Animation Frames, but I'm sure that TweenService is the best way to animate parts in the workspace.