Does anyone know what UserInputService is, I looked it up on wiki but i dont get it.
UserInputService, a service commonly used when we need some key binds going on in our game.
UserInputService
is a service that can CURRENTLY only be used in / on the Client
. (Roblox states that they will make it work on server)
For now though, you would need a LocalScript
in order to get UserInputService
. You would do:
local VarName = game:GetService('UserInputService')
Now what does it do? It's pretty self explanatory in the name itself. User input service. This service is used for key binds checking Input from the User.
So how do we detect Input?
local a = game:GetService('UserInputService') a.InputBegan:Connect(function(input, gamestuff) if gamestuff then return end -- cecks if player is doing something on a GUI such as chatting print('INPUT!') end)
The most common usage I should say is probably key binds itself. Dashing, Double Jump, Movement, Opening Gui's and so on.
For more information check: https://wiki.roblox.com/index.php?title=API:Class/UserInputService
Hopefully this gave you a brief image on what UserInputService is used for.
Best of luck developer!