Script not able to tell what type of accessory the player haves

Script:

for i, v in pairs(Triggerer.Character:GetChildren()) do
	if v:IsA("Hat") or v:IsA("Accessory") then
	     if v.AccessoryType == not Enum.AccessoryType.Hair then
	          v.Handle.Transparency = 1
	     end	
	end
end
for i, v in pairs(Triggerer.Character:GetChildren()) do
	if v:IsA("Hat") or v:IsA("Accessory") then
	     if v.AccessoryType ~= Enum.AccessoryType.Hair then
	          v.Handle.Transparency = 1
	     end	
	end
end

~= stands for not equal in Lua.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.