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

How to make a block transparent with a GUI?

local Button = script.Parent local Baseplate = game.Workspace.Baseplate

function onClick() if game.Baseplate.Transparency = "1" == true then Baseplate.Transparency = '0' == true if game.Baseplate.Transparency = "1" == true then Baseplate.Transparency = '0' == true

end

Button.MouseButton1Click:connect(onClick)


I'm trying to get it so that upon clicking a button the baseplate goes transparent and then back when it's clicked it.

1 answer

✓ Accepted answer

You really had a mess there, this might help:

local Button = script.Parent
local Baseplate = workspace.Baseplate

function onClick()
	if Baseplate.Transparency == 1 then
		Baseplate.Transparency = 0
	else
		Baseplate.Transparency = 1
	end
end

Button.MouseButton1Click:Connect(onClick)

Hope this helped! Note: Script not for FE games.

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