Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the script understand and and or?

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.

1 comment

0

I don't understand what you tried to do..

2 answers

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

2 comments

0

Post whole script if it won't be resolved :>

0

String isn't Boolean, thus it will always choose the first String in every ORs

Try this:

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

2 comments

0

kk

0

Hmm... Didn't work, maybe I'll post the whole script when I get back because maybe there are other problems.

This discussion is preserved as it was. New answers, comments, and votes are closed.