#Is there a way to hard Cancel all lerps threads
1 messages · Page 1 of 1 (latest)
CLIENT Side game.ReplicatedStorage.Animations.RemoteEvent.OnClientEvent:Connect(function(Motor,CF)
pcall(function()
Motor.C0 = Motor.C0:Lerp(CF,.3)
end)
end)
the only thing i need to know here
you cannot a cancel a lerp its not a thread. A lerp is just interpolation between two cframes. Thats like saying you want to cancel the number 4, it makes no sense
oh
shall i use tweenservices so
Yes you can cancel tweens
what are u trying to make that needs u to cancel the lerp
I am trying to deal something based of this where it cancel the Animation / stop it
okay
then simply
save the starting motor c0
connect runserivce when u play
disconnect when u need to stop and
reset to starting motor c0
igh
now i kinda encounter an issue
the Client part to the code
Aka this one will not be able to gather informations
game.ReplicatedStorage.Animations.RemoteEvent.OnClientEvent:Connect(function(Motor,CF)
pcall(function()
Motor.C0 = Motor.C0:Lerp(CF,.3)
end)
end)
u are constantly firing remotes?
Yeah.. kind of, for making the Animations clients
hold on lemme check ur code
it's an custom Animator that Act for client and Server
For Server it firectly fire event to the client making the Server Read the keyframetrack values Based of their timelines
then send the lerp motor to the client and a smoothnes, .3.
but if i wanna Make a Playing Another Animation while the last one still Playing, even throught i :stop it it'ill just feel Janky, buggy due to the lerp
is there a reason ur making a custom animator
yeah i am making CFrame Ainmations to act like an smooth animator, usable without exporting Keyframes
ok alright
what about
server just sending the reference to the choppym1 for an example
and the client just reading it off its children
so 1 remote instead of constant
yea
ok heres whta u can do
make a module in client that holds all animators
u register an animator by a function there right
yh
that way other scripts can call :Stop and :Play from this module
getting the animator instance
make sense
so like server tells client to play animation on x character -> client gets animator of x character from module -> calls play animation on animator
then say u want to stop it later
client gets animator from module -> calls stop on animator from module
i mean why not same thing
though
i suggest
instead of a runservice connection seperately for all of them
maybe try 1 runservice connection that updates all of them?
Alrighty ima try it
Also
I think i noticied FirringAllclient withit a tweenservice for Motor6D
does not seems to owrk
if the client recive the ordered value
tween might be annoying
since ur constantly making and destroying tweens
lerp might be better here
igh
wt
upload to pastebin
there we go
check this for an example
with something like this u can call from other local scripts and have them work together
oh
u understand the logic?
u welcome
wsp
I am kinda having few issue, with somme controller do you think u could help me
nvm i figured it out