Script not properly working– patient treatments showing depending on injury

  1. What do you want to achieve?
    I’m trying to make a system to that when I click on the button, it checks if they player has a tool and then if they do, depending on their injury, it’ll show the designated treatments.

  2. What is the issue?
    My main issue is that if I were to have an injury other than “Injury: arm”, it still shows treatments for arms instead of their designated treatments. There are no errors in the output so I’m assuming I may have made a silly mistake.

  3. What solutions have you tried so far?
    Please refer to the script in the pastebin. It was too large to post! Sorry.
    Treatment Options -

1 Like

I would suggest using if instead of elseif. Since elseif is only used if the last thing that happened was false. So I would try just using if. If that does not work then I am not sure what is wrong.

I’ve realized that it should be:

if text == "text" or text == "text"
instead of:
if text == "text" or "text"

This solution worked.

I appreciate the reply! I will definitely keep this in mind.