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

How do I make the script understand and and or?

Asked by
TTHKKB 12
4 years ago
Edited 4 years ago

Hello, I'm editing a script and I added lots of or, but the script got confused. Can anyone help me?

attacking = AttackArm and "rightA" or "leftA" or "rightL" or "leftL"

The script will only read until the "rightA or leftA", after that the script doesn't ready anymore.

0
I don't understand what you tried to do.. sahar1213 72 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

This is better way to separate each Arm parts and each Leg parts

attacking = AttackArm and ("rightA" or "leftA") or ("rightL" or "leftL")

It's the better way but it entirely depends on how you use it.

Logical Operators

EDIT: More photos Screenshot

0
Post whole script if it won't be resolved :> User#17685 0 — 4y
0
String isn't Boolean, thus it will always choose the first String in every ORs User#17685 0 — 4y
Ad
Log in to vote
-1
Answered by
7z99 203 Moderation Voter
4 years ago

Try this:

attacking = AttackArm and ("rightA" or "leftA" or "rightL" or "leftL")
0
kk TTHKKB 12 — 4y
0
Hmm... Didn't work, maybe I'll post the whole script when I get back because maybe there are other problems. TTHKKB 12 — 4y

Answer this question