-- Check for change event in input. Used for thumbstick input as those are analog

userInputService.InputChanged:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
		-- Check left thumbstick and move character on change
		if input.KeyCode == Enum.KeyCode.Thumbstick1 then
			character.Humanoid:Move(Vector3.new(input.Position.X, 0, -input.Position.Y), true)
		end
		-- Check right thumbstick and change camera angle on change
		if input.KeyCode == Enum.KeyCode.Thumbstick2 then
			deltaAngle = input.Position.X * 5
		end
	end
end)
 