InputService is a service used for detecting inputs made by the player
InputService
Instance.new()
IsKeyPressed(KeyList key)
local InputService = Game:GetService("InputService") while true do if InputService.IsKeyPressed(KeyList.A) then printl("Key A pressed!") end end
IsKeyHeld(KeyList key)
local InputService = Game:GetService("InputService") while true do if InputService.IsKeyHeld(KeyList.A) then printl("Key A is held!") end end
IsKeyReleased(KeyList key)
local InputService = Game:GetService("InputService") while true do if InputService.IsKeyReleased(KeyList.A) then printl("Key A is released!") end end
IsAnyKeyPressed()
local InputService = Game:GetService("InputService") while true do if InputService.IsAnyKeyPressed() then printl("A key is released!") end end
GetMousePosition()
Vector2