Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a Text Button that setts transparency of said blocks to 1 once clicked?

I would like help with making a text-button that can sett the transparency of certain blocks to 1 after being clicked and if clicked again, it can be sett back to 0.

1 comment

0

What have you tried so far?

1 answer

✓ Accepted answer

1: Insert a part in the workspace. 2: insert a ScreenGUI in StarterGUI. 3: Insert a Text Button into the ScreenGUI. 4: (optional) Customize your text button. 5: Insert a LocalScript into your text button. 6: Insert this code:

local button = script.Parent
local part = game.Workspace.Part --Rename "Part" to whatever you named your part.

button.MouseButton1Click:Connect(function()
	if part.Transparency == 0 then
		part.Transparency = 1
	elseif part.Transparency == 1 then
		part.Transparency = 0
	end
end)


1 comment

0

it should work

This discussion is preserved as it was. New answers, comments, and votes are closed.