How do i make when i click again a button it disappears

Hello I need help when i click again a button it disappears
like it gets transparent wen you click first timeit appears a block but when u click again the button it dissapears the block

So if anyone could help me ill be very greatful! :smiley:

Put this in a Local Script in your button. Change β€œPart” to the name of the part in the workspace that you want to appear

Try this


local part = game.Workspace.Part

script.Parent.MouseButton1Click:Connect(function()
	if part.Transparency == 0 then
		part.Transparency.Transparency = 1
	else
		part.Transparency.Transparency = 0
	end
end)
1 Like