How can I add an option in my group system to make players visible or invisible?

Currently, I’m struggling with making a toggle to make players invisible or visible, it’s rather easy to make if I’m ONLY making them invisible and visible but my game relies on tools, and I’m unsure of how I could get rid of the other players and there equipped tools or tools they may equip in the near future without straight up deleting them (because if I do this, I can’t make them visible again)

Any help is greatly appreciated, if you need more information or better explaining please let me know.

You can use pair loops for this. You can loop throughbthe player and make their entire body invisible including tools and more.

local function InvisibilityToggle(invisible)
	if invisible == true then
		-- your script
	else
		-- your script
	end
end

character.ChildAdded:Connect(function(tool)
	if tool:IsA("Tool") then
		InvisibilityToggle(true)
	end
end)

character.ChildRemoved:Connect(function(tool)
	if tool:IsA("Tool") then
		InvisibilityToggle(false)
	end
end)