of     1   

Soundcrusher
#140286409Monday, July 14, 2014 8:42 AM GMT

Hello there, I'm trying to make a script execute a print on tab key pressend. To bad it doesn't execute. Here's the code: local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.KeyDown:connect(function(key) if key:byte() == 9 then print("Tab pressed yo") end end end)
AnonyAnonymous
#140286470Monday, July 14, 2014 8:43 AM GMT

Is it inside of a LocalScript?. Also, where is the script located?.
Soundcrusher
#140286530Monday, July 14, 2014 8:45 AM GMT

local player = game.Players.LocalPlayer --< You see that, localplayer. a localplayer is always located inside a playergui OR starterpack.
YasuYoshida
#140286554Monday, July 14, 2014 8:45 AM GMT

you have so many ends. local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.KeyDown:connect(function(key) if key:byte() == 9 then print("Tab pressed yo") end end)
Soundcrusher
#140286607Monday, July 14, 2014 8:46 AM GMT

Yeah sorry, the one extra end is from my code I forgot to erease. Do not pay attention to one end.
Soundcrusher
#140287661Monday, July 14, 2014 9:14 AM GMT

Come'on people, why is it not executing a simple print()?
Soundcrusher
#140307397Monday, July 14, 2014 4:02 PM GMT

Okey since nobody is responsing let me ask it differently: how can i print somethng when player press TAB Button?
YasuYoshida
#140314373Monday, July 14, 2014 5:27 PM GMT

Try the code below. local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.KeyDown:connect(function(key) if key.byte() == 9 then print('tab pressed') end end)
DeviousDeviation
#140314451Monday, July 14, 2014 5:28 PM GMT

guuuyys, use ContextActionService k.
Soundcrusher
#140315687Monday, July 14, 2014 5:41 PM GMT

@Single, nop. It always should be x:byte()

    of     1