Basically, I tried multiple times to do something as
Blocking = true
which would cancel the combat, but none of the values were changing, so I tried manually changing them, and I only learned that it didn’t affect the scripts at all? What could be the problem, or different way I could do this without using too much Memory?
Just have if statements dotted around in the code to stop it. Usually id do this in a while statement e.g
while true do
-- some code
if ForceStop == true then
break
end
-- More code
-- repeat if statement and more code pattern as required
-- code finished so break it
break
end
Break stops any loop at that point so stops it going any further, but code will always run in order of lines so you still need multiple checks.
So here is the problem with GetAttribute(), having to declare that function onto the object will only just give you what the current value of that Attribute is. Now, if you wanted to make sure it was EDITABLE, then you should be able to do this instead:
LOL I was having a problem with attributes and you helped me with that, even though that message wasn’t for me thanks! now i finally understand how attributes work
Character:GetAttributes() if all of your variables are combat related, and itll do the same thing. Yoy just need to refrence Attributes.Blocking
This looks like the error. You need to do CombatRelatedVar.Blocking to REFRENCE the variable, and that variable is a local variable of an attribute’s value. Instead, you’d need to do Players:SetAttribute(“Blocking”, true) to SET the value of the attribute.