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

How do I search the Backpack for multiple tools?

Asked by 1 year ago

Hello. There is no failing Code that I could show here. That is because I want to know how write a specific set of code. What I am trying to do: I am making a keycard door that is basically looking in the entire backpack of the LocalPlayer for the highest Keycard.

I don't want to go into detail because I just want some simple help how I could write this Code. I have 6 Keycards, and a few other Tools. The Door is supposed to check the entire Backpack for the highest Keycard it can find and then act on that. The Function is activated upon a proximity prompt being triggered, but that shouldn't change anything.

How would I write that code?

0
i dont know what defines the value of the keycard but u could use the GetChildren() function to get all the tools from a players backpack then check their values using a for loop. this is very general advice tho, gl ZeroToH3ro 82 — 1y

Answer this question