Trash Can Question

Is it possible to make it so when you go up to the trash can to clear your inventory, you can make it so you can’t clear some items, such as a room key? Thanks if you can lmk!


I’m pretty sure you can modify the script in there to delete a certain item with a certain name.

Alright, so you have the current code, right?

If so, send it to me please, then we can go over it.

LocalScript or ServerScript?

Which one do you think?

LocalScript. Am I right?

LOL. (20char) I am probably not right…

Also, here is a suggestion: Airport Gate System/Boarding System

Out of interest, why would you say “LocalScript”?

The one that is in StarterGUI, and that is a LocalScript.

Alright, but why would you pick that, what’s inside the code that would persuade you to do that?

1 Like

In the video, it said to…

I asked you what script you think we should edit to achieve what you want to?

1 Like

Oh! Because it has the most of the script.

I think cookie is looking for a better answer, to ensure you understand some of the code in there.

1 Like

Yeh, we’re a bit off there, we should be using the ServerScriptService script, this is as we have our delete function inside of it, anyway, let’s continue, how do you want to prevent an item from being deleted, if it has a certain name, or do you have a different way of identifying it?

1 Like

Certain name. :slight_smile: (20char)

1 Like

Alright, well we want to make this code efficient, right?

1 Like

Yessirree! (20charrrrrrr)

Epic, so we should probably make a table with the names of the objects we want to protect, have a go at that.

1 Like