Skip to content

Cleaner doesn't cancel Tweens #1

Description

@rafaskb

When Tweens created by TweenService are added to Cleaner via Cleaner:Add(Tween), they're not cancelled.

This happens because Cleaner checks the typeof of the object being cleaned up, and Tween reports itself as Instance, but Tween:Destroy() doesn't work, we have to call Tween:Cancel() instead.

A simple fix would be to check whether Object:IsA("Tween") then Object:Cancel() else Object:Destroy(), but that's not very elegant.
Image

As a workaround, we can always add a function that calls Cancel instead of passing the Tween directly, but the expected behavior is that Cleaner will just take care of it.

Tested in Cleaner v0.3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions