Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is wrong with this script in StarterGUI, it is not closing when button is clicked?

Asked by 6 years ago
function KeyPressed(Key)
if Key == "c" then
mh.Visible = false
end
end

function KeyUnPressed(Key)
if Key == "o" then
mh.Visible = true
end
end



Mouse.KeyDown:connect(KeyPressed)
Mouse.KeyUp:connect(KeyUnPressed)

It's in StarterGUI, StarterGUI>Frame>Frame>TextLabel>ThisScript So I don't know whats wrong... There's no error coming out from Console

0
Is it a normal script or a local script? Also, have you defined "Mouse"? Furthermore, KeyDown and KeyUp if deprecated, so use UserInputService instead. UgOsMiLy 1074 — 6y

Answer this question