So this is a script inside a part with a clickdetector. it is supposed to make a part is workspace called: "Mask" invisible, but turn it visible If it is visible. but its not working! Help!
if game.Workspace.Mask.Transparency ==1 then script.Parent.ClickDetector.MouseHoverEnter:Connect(function() game.Workspace.Mask.Transparency = 0 end) else if game.Workspace.Mask.Transparency ==0 then script.Parent.ClickDetector.MouseHoverEnter:Connect(function() game.Workspace.Mask.Transparency = 1 end)
I fixed up your script and made it look better:
local mask = workspace:WaitForChild("Mask")--You should use "workspace" instead of "game.Workspace", also this line just sets the variable for the mask script.Parent.ClickDetector.MouseHoverEnter:Connect(function()--Condensing it to 1 connection if mask.Transparency == 1 then mask.Transparency = 0 elseif mask.Transparency == 0 then--"else if" is wrong it's supposed to be "elseif" mask.Transparency = 1 end end)