I just want the code to check if the player your are fighting is blocking or not?
for some reason it can tell if the value is false, but not if its true
I pre set the values thatll be in other players in a dummy for testing purposes
if humm.Health>0 then
if (hrp.Position - hr.Position).magnitude <= 7 and (hrp.Position - hr.Position).magnitude < maxdis and not humm:GetAttribute("Blocking") then
maxdis = (hrp.Position - hr.Position).magnitude
hr.CFrame = CFrame.new(hr.Position,hrp.Position)
hrp.CFrame = CFrame.new(hrp.Position,hr.Position)
comremote1:FireServer(humm,bh)
maxdis = math.huge
elseif(hrp.Position - hr.Position).magnitude <= 7 and (hrp.Position - hr.Position).magnitude < maxdis and humm:GetAttribute("blocking") then
print("notblocking")
print(humm:GetAttribute("BlockingHealth"))
maxdis = math.huge
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.