Skip to content
This repository was archived by the owner on Nov 10, 2018. It is now read-only.
This repository was archived by the owner on Nov 10, 2018. It is now read-only.

Behavior causes Tool.Equipped to fire recursively #2

@Anaminus

Description

@Anaminus

When an object is added to the character via a listener connected to the Equipped event, the Equipped event fires once again. This causes the maximum re-entrancy depth to be exceeded.

Tool.Equipped:connect(function()
    local v = Instance.new("IntValue")
    v.Parent = Character
end)

This does not occur after the listener thread yields.

Tool.Equipped:connect(function()
    wait()
    local v = Instance.new("IntValue")
    v.Parent = Character
end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions