Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

KeyDown LocalScript not executing correctly?

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key)
	if key == "e" then
		print("e pressed")
	end
end)

This LocalScript is cloned and put into PlayerGui when a new player joins, and I've ensured that I'm cloning it correctly and everything and it just seems to refuse to do what I want it to, or seemingly run at all.

Is there some other event I should be using for key presses? I've been stuck trying to get this LocalScript to work for a large part of the day.

2 answers

This discussion is preserved as it was. New answers, comments, and votes are closed.