TweenServiceV2 issues

Hi, I am using TweenSeviceV2 by ScriptOn. But it should function pretty simillar to the normal tween (as it uses normal tween sevice).

So my problem is that I keep getting the error Tween being paused does not exist. when trying to pause tweens using remote events.

Doing:

tween:Play()
wait(2)
tween:Pause()

works great, but when I do something like this:

startEvent.OnServerEvent:Connect(function()
	tween:Play()
end)

pauseEvent.OnServerEvent:Connect(function()
	print("Pausing tween!")
	tween:Pause() 
end)

It starts the tween, when trying to stop it, I get the error: Tween being paused does not exist.

I am not sure why this happens, just because I am using a remote event… but maybe you have an idea why this might happen?

Thanks for any help! :slight_smile:

Edit:
I tested this, and for some reason it works if both :Pause() and :Play() is in the SAME event:

startEvent.OnServerEvent:Connect(function()

tween:Play()

wait(2)

tween:Pause()

end)

Thanks for reading!

Not really sure the reason for the error, but based on the solution you provided, something like this could help:

tweenEvent.OnServerEvent:Connect(function(play)
    if play then
        tween:Play()
    else
        tween:Pause()
    end
end)

then on the server side, pass either true to get it to play, or false (or just no value) for pause

(this is just a work around)