player = game.Players.LocalPlayer
mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "h" then
game.StarterGui.ATMhacker.Frame.ihack.Visible = true
else
print("Y U No Press H")
end
end)
-- it works when i use Print(), but not this, please help me out!
COMMUNITY QUESTION
My Keypress doesnt make gui.Visible = true, help!?
1 answer
If you edit the StarterGui, you're editing what people will see after joining or resetting. Edit player's PlayerGui.
player = game.Players.LocalPlayer
mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "h" then
player.PlayerGui.ATMhacker.Frame.ihack.Visible = true
else
print("Y U No Press H")
end
end)
-- it works when i use Print(), but not this, please help me out!
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Thanks that really helped! But i still dont get why i should edit PlayerGui and not StarterGui...
Oh and when should i use PlayerGui and when StarterGui???
You should always use PlayerGui because that is what the player sees. If you edit StarterGui that's what people will see on respawn..