Help with if

Im making a code that checks if you are a player first then if hes armor are over something but i can’t spawn it when ingame and i know it’s the second if cuz if i remove it it workes anyway heres the code
[lua]if ply:IsPlayer() then
if ply:Armor >= 50
then
ply:SetArmor(ply:Armor() + 50)

self.Entity:Remove()

end
end[/lua]

i’ve also tried
[lua]if ply:IsPlayer() and ply:Armor >= 50 then

ply:SetArmor(ply:Armor() + 50)

self.Entity:Remove()

end
end[/lua]

but it won’t work

Have you tried:
[lua]if ply:IsPlayer() and ply:Armor() >= 50 then

ply:SetArmor(ply:Armor() + 50)

self.Entity:Remove()

end
end[/lua]

Forgot ( ) after Armor ;p

Agree’d, that should fix the spawning problem when you fix the Lua errors.

Thanks

Beat you to it.