I've made code for an error frame. But it wasn't very efficient. So I'm making a more efficient way with UserInputService and :GetPropertyChangedSignal(). But it isn't working. I'm making it with keyboard to test it out. Code:

local frame = script.Parent
local userInputService = game:GetService("UserInputService")

userInputService:GetPropertyChangedSignal("KeyboardEnabled"):Connect(function()
	if userInputService.KeyboardEnabled == true then
   		game:GetService("ReplicatedStorage").onGamepadOrVR:FireServer()
	end
end)

Thanks, b_mni.

2 comments

0

What isn't working about it? Tried debugging using print()?

0

lemme try that - nope it didn't work (EDIT)