Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a tool that deletes itself if deselected?

Asked by
Prioxis 673 Moderation Voter
10 years ago

I'm making a inventory GUI but I want the tools to delete themselves if deselected...

1 answer

Log in to vote
1
Answered by 10 years ago

Easy.

Use the Deselected event.

tool = --put tool reference here
tool.Deselected:connect(function()

tool:Destroy()

end)

Good luck; and please consider leaving me an upvote!

Ad

Answer this question