Hello
My script based on keydown event When i press E on keyboard a number value in workspace need to change.
plr = game.Players.LocalPlayer
Mouse = plr:GetMouse()
Mouse.KeyDown:connect(function(key)
if key == "e" then
game.Workspace.NumberValue.Value = 1
end
end)
It's works in studio with Filter enabled, but when i wanna try this in roblox it's Doesn't work, when i press E in game, this doesn't change value, also by enter this command in Developer console
print(game.Workspace.NumberValue.Value)
Developer console show the old number, so this doesn't change.
Any help?

3 comments
Thank you!
Where should i need to put first script?
Under StarterGui, StarterPack, ot StarterPlayerScripts