headArmor = script.Parent.Parent.Parent.Parent:FindFirstChild("headArmorEquip")

script.Parent.MouseButton1Click:connect(function()
	if headArmor.Archivable == false then
		headArmor.Archivable = true
	else
		headArmor.Archivable = false
	end
end)


"headAmorEquip" is a folder

This is in a local script (not sure what difference between the 2 script types are)

I've also done it like...

headArmor = script.Parent.Parent.Parent.Parent:FindFirstChild("headArmorEquip")

script.Parent.MouseButton1Click:connect(function()
	if headArmor.Archivable == false then
		headArmor.Archivable = true
	end
end)



script.Parent.MouseButton1Click:connect(function()
	if headArmor.Archivable == true then
		headArmor.Archivable = false
	end
end)


2 comments

0

Umm the first code is okay, but i don't think you can change the Archivable value in the game only in studio

0

I am curious why you made 2 of the same event..