sorry if this is some stupid question but I am new to scripting and I really don't know what to do. here is my script:
boolvalue = game.StarterGui.lever
clickdetect = script.Parent.ClickDetector
main = script.Parent
main2 = script.Parent.Parent.Main2
function(onClick)
boolvalue.Value = true
main.Transparency = 1
main2.Transparency = 0
end)
clickdetect.MouseClick:Connect(onClick)
the error is on the (onClick)

3 comments
What is inside the parentheses are the arguments, not the name of the function, to properly make a function, do "function myFunction(arguments)"
What are you doing in StarterGui though? Are you aware that changes in StarterGui won't affect the Players? I believe the changes you want tot make is in PlayerGui
I was trying to enable a bool value when a button is pressed and this is the same way I made all of my other scripts with a click detector but for some reason it didnt work now