I added an attribute named “CanM1Air” to a LocalScript, which says if the M1 Air attack can be used. The attribute is mentioned in the script 2 times, the second time is in --[] for testing purposes. I put disabled breakpoints where the attribute is mentioned.
- Does the attack if the attribute is true
If the image is too small:
M1Input.Pressed:Connect(function()
if char:GetAttribute("Attacked") == false then
-- Air M1
print(script:GetAttribute('CanM1Air'))
if char:GetAttribute("Attacking") == 0 and script:GetAttribute('CanM1Air') == true and hum:GetState() == Enum.HumanoidStateType.Jumping or hum:GetState() == Enum.HumanoidStateType.Freefall then
script:SetAttribute('CanM1Air', false)
lawHitboxRemote:FireServer(5)
lawVFXRemote:FireServer(5, "on")
plr.Character:SetAttribute("Attacking", 1)
AirAT:Play()
for i,v in pairs(char.M1AirVFX:GetDescendants()) do
if v:IsA("ParticleEmitter") or v:IsA("Beam") then
v.Enabled = true
end
end
local liv = Instance.new("LinearVelocity")
liv.MaxForce = 30000
liv.VectorVelocity = hrp.CFrame.lookVector * 50
liv.Attachment0 = hrp:FindFirstChild("Attachment")
liv.Parent = hrp
hum.AutoRotate = false
AirAT.Stopped:Wait()
lawHitboxRemote:FireServer("off")
lawVFXRemote:FireServer(5, "off")
if char:GetAttribute('Attacking') == 1 then char:SetAttribute('Attacking', 0) end
print("air m1 stopped")
liv:Destroy()
hum.AutoRotate = true
for i,v in pairs(char.M1AirVFX:GetDescendants()) do
if v:IsA("ParticleEmitter") or v:IsA("Beam") then
v.Enabled = false
end
end
print(script:GetAttribute('CanM1Air'))
- Sets the attribute to true, it shouldn’t matter because its a comment
I just added this, theres no duplicate scripts, no attribute with the same name, or the attribute being mentioned somewhere else. The combat input system works, theres other attacks that are a lot more complex in the if M1Input.Pressed:Connect() block of code.
This is the test result:
In both the output and the propterties tab, it shows CanM1Air stays false.
![]()
Why is the attribute being ignored?

