Do userinputservice functions run in their own coroutines?

Just like the title says:

Do user-input service functions run in their own coroutines?

Example:


UserInputService.InputBegan:Connect(function (input, gameProcessed)
	
	if gameProcessed then return end
		
	if input.KeyCode == KeyToUse3 and Ability_Shockwave == false then
		Ability_Shockwave = true
		wait(6)
		Ability_Shockwave = false

	end
end)

Does the whole function gets stuck in the wait, should I do a coroutine or if I press another key the new userinputservice will run in its own coroutine?

Each function called is in its own Lua thread. So one function fire of the event won’t hold a function fired if another key gets pressed.

2 Likes