I get this error in my script and I have no clue why.
My script basically what it does is (Yes its a Star Wars game) Darth Vader has a force choke move and I wanted it to do different damage to players depending on their class.
But the problem is it thinks everyone is the same class.
Heres the code so you know what I mean.
if ReplicatedStorage.ClassStorage[TargetPlayerID].Value ~= "RebelAssaultClass" or "RebelHeavyClass" or "RebelOfficerClass" or "RebelSpecialistClass" or
"ImperialAssaultClass" or "ImperialHeavyClass" or "ImperialOfficerClass" or "ImperialSpecialistClass" then
print("Jedi Choked")
print(TargetPlayerID.Value)
TargetCharacter.Humanoid.WalkSpeed = 0
TargetCharacter.Humanoid.JumpPower = 0
Choking.Stopped:connect(function()
TargetCharacter.Humanoid.WalkSpeed = 20
TargetCharacter.Humanoid.JumpPower = 75
TargetCharacter.Humanoid:TakeDamage(75)
end)
else
print("Player Choked")
TargetCharacter.Humanoid.WalkSpeed = 0
TargetCharacter.Humanoid.JumpPower = 0
Choking.Stopped:connect(function()
TargetCharacter.Humanoid.WalkSpeed = 16
TargetCharacter.Humanoid.JumpPower = 50
TargetCharacter.Humanoid:TakeDamage(100)
end)
end
The 8 basic classes are there and I wanted it to if you arent one of those classes to do less damage and since the special classes have a different walkspeed it sets that accordingly.
The problem is as I said, it thinks everyone is 1 class like its not finding the classes.
Also the print statement that says print(TargetPlayerID.Value) errors with the error in the title so I am assuming the if statement is erroring as well its just not saying it is.
If you have questions please ask, because I really wanna solve this problem. Thank you for your time :)
