I'm trying to alter my key binding code to make it use InputChanged rather than a combination of InputBegan and InputEnded to make adding new binds easier, but InputChanged seems to be only firing on MouseWheel and MouseMovement UserInputTypes, only.

if not uis.TouchEnabled then
	uis.InputChanged:connect(function(inst)
		print(inst.UserInputType)
		if inst.UserInputType == Enum.UserInputType.Keyboard then
			local key = inst.KeyCode
			local fal = inst.UserInputState == Enum.UserInputState.Begin and true or false
			--snop keycodes for binds junk
		elseif inst.UserInputType == Enum.UserInputType.MouseWheel then
			--TODO: Zooming stuff
		end
	end)
else
	--TODO: Touch Controls
end

Is there any workaround for this?

Turns out InputBegan/Ended doesn't trigger MouseWheel or MouseMovement.

Sucks for me. :/

2 comments

0

You need to use the PlayerMouse object. I couldn't write a script right now because I'm on mobile.

0

No I don't. The UserInputService exactly what I need to use, it's just that the Changed event doesn't fire for bobs that use the Beging and Ended events, and vice versa.