button = script.Parent
function transparent()
game.StarterGui.ScreenGui.Frame.Visible = false
end
button.MouseButton1Click:Connect(transparent())
while true do wait()
debounce = false
wait(1)
end
the ui wont go invisible when clicked and shows this error
button = script.Parent
function transparent()
game.StarterGui.ScreenGui.Frame.Visible = false
end
button.MouseButton1Click:Connect(transparent)
while true do wait()
debounce = false
wait(1)
end
If I’m correct, it should be this. I don’t think you include the () of the function.
Assuming the script is a LocalScript
Didn’t include the loop because it didn’t seem necessary
Button = script.Parent;
function Transparent()
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false;
end
Button.MouseButton1Click:Connect(Transparent)