Let's say A is the Player and B is the enemy player. My goal is to check if the player is apart of the enemy player's team. If that's true, we don't deal damage. However, if they're both neutral and not part of a team, they can damage each other. But the thing is, both players are neutral and are not a part of a team and they still do not deal damage. Any help?
local function allowDamage(A,B)
if A.Neutral == true and B.Neutral == true then --If they are not part of a team then we return true
return true
elseif A.TeamColor == B.TeamColor and game:GetService("ReplicatedStorage").GameValues.teamGamemode.Value == true then --If the gamemode is a team related gamemode and both players are in each other's team then we return false
return false
end
end
local passDamage = allowDamage(Player,EnemyPlayer)
if passDamage == true then
--Damage the enemy player
else
--Don't damage the player
end
These are just snippets of the code. Click here for the full code, the indentation got messed up when I copy and pasted the code.

8 comments
please send full script using Lua button so I can determine how your script is working
Right now all I can say is you’re doing something wrong with damaging the player, you’re possibly changing the Neutral property clientsided, or you’re only running the if-then statement once. If those aren’t your problems, can you show a bit more of your code and tell me where the script is located?
I can tell more, sure! Basically, my tool shoots out a projectile. Then, a script in the tool clones another script and pastes it into said projectile. This script I'm showing in the question is located in the projectile. Here's the pastebin link: https://pastebin.com/raw/cp3wTNeM
If you're wondering why it looks so weird the indenting got messed up.
Hmm...so, do you have a "creator" ObjectValue in the ball? If so, how do set its value to the player? Do you also have the script disabled and enable it when cloned to the ball? I would need to test the script to find more problems but I can't do that right now.
I have a Creator objectvalue in the projectile, and I clone it into the humanoid. I set its value using a script that clones the objectvalue into the projectile beforehand. I also enabled it once cloned in.
edit: new paste, https://pastebin.com/raw/4NwHSC1p
I'd print the value of passDamage in your actual script and see if it is checking correctly. If it is, there is probably an if statement that is stopping the rest of your code from running.