So I can just remove that bit and leave the duration variable in the line
I would keep it… I forgot that I used that variable in my equation lol
the run.framerate variable is usually around 60, so if you really wanted to remove it, you could replace it with 60 (which is an estimated number)
It works, but it’s too fast, it happens in an instant, and that’s not what I wanted, I wanted it to be smoother and like the EasingStyle - Quart, where it slows down at the end
lol ok, just as I thought, still happens in an instant, even though I set the duration to 2.
It’s perfectly fine though, because I still appreciate that you helped out.
For my own game, I use render stepped, and it works perfectly…
do you have a copy of the code?
Yes infact I do, it’s similar to the first one I ever posted.
make sure that your alpha is this ^
Weld.C0 = c0:Lerp(target, (math.min(1, alpha + (1 / run.framerate * duration))))
Also make sure your Weld.C0 equation looks like this^
Sure let me change that then, but I don’t really expect a change
You have to multiply the duration by the run.framerate variable or the animation will play around 60 times faster than expected…
local run = {}
runservice.RenderStepped:connect(function()
local newtime = tick()
run.dt = newtime - run.time
run.time = newtime
run.framerate = 1 / run.dt
end)
Also make sure that you have this block of code somewhere (replaced with heartbeat instead of renderstepped)
Also replace runService.framerate with run.framerate (if you followed the same setup as above)
Once you make those edits, repost the code so that I know where you are at right now lol.
like I said before…
So replace renderstepped with heartbeat
run.time = tick()
run.dt = 1/60
run.framerate = 1 / run.dt
runservice.RenderStepped:connect(function()
initialize it^ (before the runservice.Heartbeat:connect( ) stuff
I seriously have no idea what you’re even going on about, like I mean why are the parameters for run = {} empty
run is a table, and I store variables in that table…
Can you send a copy of your code again lol?
This is going on for so long, which part of it?
All of it (pertaining to what we are working on)
Because it’s more of a dictionary, rather than a table of values…
You wrote run.dt = newtime - run.time before writing the time variable run.time = newtime