I'm attempting to make the simplest of functions that hides the relevant screen gui labels and buttons but I can't even get that to work.
function BPressed(Button)
Button.Visible = false
Button.Parent.Visible = false
end
script.Parent.OpenMenu.Battle.MouseButton1Down:Connect(BPressed(script.Parent.OpenMenu.Battle))
Whenever I try to test it instead of connecting the function it just executes the function and gives me the error "Attempt to connect failed: Passed value is not a function"
Is something the matter with my script? What's going on?
