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

How do I detect when a user presses the Spacebar?

I know how to use keys like

plr = game.Players.LocalPlayer:GetMouse()
plr.KeyDown:connect(function(key)
if key:lower()=="e" then --Can just change e
--Make something happen
end
end)

So how would I make something happen when I pressed spacebar?

2 answers

You could also have the script look for the "Jump" property in a humanoid, but otherwise 1waffle1's solution should work.

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